You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ronimizy edited this page Feb 3, 2024
·
6 revisions
To use producer, you do not need to implement any interfaces. You can get an instance of IKafkaMessageProducer<,> from DI container.
Use ProduceAsync method to produce messages. It accepts IAsyncEnumberable> and has an extension overload for accepting a single KafkaConsumerMessage<,>.
Before that, you have to register a consumer with type arguments corresponding to message key and value respectfully.
When using outbox producer, you still have to get IKafkaMessageProducer<,> instance from DI container. Only difference is in configuration, see outbox configuration Wiki for documentation.