示例#1
0
            public KafkaUsingApp()
            {
                Endpoints.ConfigureKafka();
                Endpoints.ListenToKafkaTopic("messages", ConsumerConfig);
                Endpoints.Publish(pub => pub.Message <ColorChosen>().ToKafkaTopic("messages", ProducerConfig));

                Handlers.IncludeType <ColorHandler>();

                Services.AddSingleton <ColorHistory>();

                Extensions.UseMessageTrackingTestingSupport();
            }
示例#2
0
 public FailureSender()
 {
     Endpoints.ConfigureKafka();
     Endpoints.PublishAllMessages().ToKafkaTopic(Topic, FailureProducerConfig);
 }
示例#3
0
 public Receiver(string topic)
 {
     Endpoints.ConfigureKafka();
     Endpoints.PublishAllMessages().ToKafkaTopic(Sender.ReplyTopic, ProducerConfig);
     Endpoints.ListenToKafkaTopic(topic, ConsumerConfig);
 }
示例#4
0
 public Sender()
 {
     Endpoints.ConfigureKafka();
     Endpoints.PublishAllMessages().ToKafkaTopic(Topic, ProducerConfig);
     Endpoints.ListenToKafkaTopic(ReplyTopic, ConsumerConfig).UseForReplies();
 }