Reputation: 203
I would like to use the BinderAwareChannelResolver
bean in order to send message to Kafka with a topic name that is resolved on runtime.
My problem is that the partitionCount
in the BindingProperties
of this topic defaults to 1.
This value does not reflect the true number of partitions when this topic already existed in Kafka and also when this topic is created by the client (with partition count equal to the minPartitionCount
configuration value).
How can I make this property reflect the true number of partitions?
Upvotes: 0
Views: 973
Reputation: 174554
BindingProperties are never updated to reflect the physical topic configuration; the properties are used for configuration only.
With 2.0, you can use a NewBindingCallback<KafkaProducerProperties>
to modify the properties for a dynamic destination - see the documentation.
Upvotes: 1