public ITopicProducer <TKey, TValue> GetProducer <TKey, TValue>(Uri address) where TValue : class { ITopicProducer <TKey, TValue> producer = _provider.GetProducer <TKey, TValue>(address); return(new TopicProducer <TKey, TValue>(producer, _consumeContext)); }
public EdgeRegistryServiceTests(SchemaRegistryService schemaRegistryService, EdgeRegistryService edgeRegistryService, ITopicProducer <InsertObject> kafkaProducer, Fixture fixture) { _edgeRegistryService = edgeRegistryService; _schemaRegistryService = schemaRegistryService; _kafkaProducer = kafkaProducer; _fixture = fixture; }
async Task Execute(BehaviorContext <TInstance> context) { ConsumeEventContext <TInstance> consumeContext = context.CreateConsumeContext(); var message = await _asyncMessageFactory(consumeContext).ConfigureAwait(false); ITopicProducer <TMessage> producer = context.GetProducer <TMessage>(); await producer.Produce(message, _pipe).ConfigureAwait(false); }
internal static ITopicProducer <T> GetProducer <T>(this PipeContext context) where T : class { var factory = context.GetStateMachineActivityFactory(); ITopicProducer <T> producer = factory.GetService <ITopicProducer <T> >(context) ?? throw new ProduceException($"TopicProducer<{TypeMetadataCache<T>.ShortName} not found"); return(producer); }
async Task Faulted(BehaviorContext <TInstance> context) { if (context.TryGetExceptionContext(out ConsumeExceptionEventContext <TInstance, TException> exceptionContext)) { var message = await _asyncMessageFactory(exceptionContext).ConfigureAwait(false); ITopicProducer <TMessage> producer = context.GetProducer <TMessage>(); await producer.Produce(message, _pipe).ConfigureAwait(false); } }
public PaymentCommandHandler( IPaymentRepository paymentEventRepository, IMediatorHandler mediatorHandler, IDataProtectionProvider dataProtectionProvider, ITopicProducer <PaymentRegisteredEvent> topicProducer, INotificationHandler <DomainNotification> notifications) : base(mediatorHandler, notifications) { this.repository = paymentEventRepository; this.mediatorHandler = mediatorHandler; this.dataProtectionProvider = dataProtectionProvider; this.topicProducer = topicProducer; }
public ElasticsearchTests( ITopicProducer <InsertObject> kafkaProducer, SchemaRegistryService schemaRegistryService, EdgeRegistryService edgeRegistryService, Fixture fixture, IOptions <ConfigurationOptions> options) { _kafkaProducer = kafkaProducer; _schemaRegistryService = schemaRegistryService; _edgeRegistryService = edgeRegistryService; _fixture = fixture; _options = options.Value; }
static HomeController() { _comments = new List <Comment>() { new Comment { Id = 1, Author = "", Text = "kafka and react" } }; _kafkaProducer = new KafkaTopicProducer("test"); }
public MaterializationTests( OnDemandMaterializerService onDemandMaterializerService, SchemaRegistryService schemaRegistryService, QueryRouterService queryService, ITopicProducer <InsertObject> kafkaProducer, Fixture fixture, EdgeRegistryService edgeRegistryService) { _onDemandMaterializerService = onDemandMaterializerService; _schemaRegistryService = schemaRegistryService; _queryService = queryService; _kafkaProducer = kafkaProducer; _fixture = fixture; _edgeRegistryService = edgeRegistryService; }
public SchemaRegistryServiceTests( SchemaRegistryService schemaRegistryService, QueryRouterService queryService, ITopicProducer <InsertObject> kafkaProducer, Fixture fixture, EdgeRegistryService edgeRegistryService, OnDemandMaterializerService onDemandMaterializerService, IOptions <ConfigurationOptions> options) { _schemaRegistryService = schemaRegistryService; _queryService = queryService; _kafkaProducer = kafkaProducer; _fixture = fixture; _edgeRegistryService = edgeRegistryService; _onDemandMaterializerService = onDemandMaterializerService; _options = options.Value; }
public KafkaProducer(ITopicProducer <TEvent> topicProducer) { _topicProducer = topicProducer; }
//private readonly ILogger logger; public BankEventHandler(ITopicProducer <CreateTransactionEvent> topicProducer) { this.topicProducer = topicProducer; }
public PaymentEventHandler(ITopicProducer <PaymentRegisteredEvent> topicProducer) { this.topicProducer = topicProducer; }
public KeyedTopicProducer(ITopicProducer <TKey, TValue> topicProducer, KafkaKeyResolver <TKey, TValue> keyResolver) { _topicProducer = topicProducer; _keyResolver = keyResolver; }
public MessageConsumer(ITopicProducer <AuditMessage> topicProducer) { this.topicProducer = topicProducer; }
public TopicProducer(ITopicProducer <TKey, TValue> producer, ConsumeContext consumeContext) { _producer = producer; _consumeContext = consumeContext; }