Open uladzislau-belykh opened 2 years ago
BinderAwareChannelResolver
is deprecated in favor of the following options.
spring.cloud.stream.sendto.destination
property. More details here.StreamBridge
API is provided. See more details here.Try one of these options and see if that fits your use case.
First of all, sorry, I mixed parts from different modules.
As I know all of them use the same workflow inside (create a new MessageHandler, ProducerFactory, and KafkaTemplate for each new destination).
In my case, I need to have the opportunity to call "flush" for all my destinations at the same time. Probably, it can be achieved by using the same ProducerFactory for all my destinations(as it works when transactionIdPrefix is set). Can it be done without using transactions?
Hi,
I am trying to create a simple application that will consume records from one topic and route them to multiple topics. I have an expression that resolves the destination route. Also I use Ack and KafkaIntegrationHeaders.FLUSH for providing guarantees.
I've had the next tries:
I've tried to use BinderAwareChannelResolver and to resolve each destination separately. The problem is that we can't make "flush" for all of them at the same time, because each of them has separate KafkaTemplate
For the next try, I've found topicExpression in KafkaProducerMessageHandler. But for using it Kafka binder creates a useless topic(by name of destination) and the "autoCreateTopics" property doesn't work for it. Is it expected behavior?
Can you advise me on how to do my task in the best way?