예제 #1
0
 public KafkaTopicWriter(
     string topic,
     IProducerFactory producerFactory,
     IHandle <TKey, TMessage, TResponseKey, TResponse> handle,
     Func <TResponse, TResponseKey> resolveKey)
 {
     _topic      = topic;
     _resolveKey = resolveKey;
     _stream     = handle.Stream;
     _producer   = producerFactory.Create <TResponseKey, TResponse>(_stream.Configuration);
 }
예제 #2
0
 public HandleAction(Action <IConsumeContext <TKey, TMessage> > handle, INetStream <TKey, TMessage> stream)
 {
     _handle = handle;
     _stream = stream;
 }
예제 #3
0
 public HandleFunction(Func <IConsumeContext <TKey, TMessage>, TResponse> handle, INetStream <TKey, TMessage> netStream)
 {
     _handle = handle;
     _stream = netStream;
 }