Replies: 1 comment 4 replies
-
Hi @filiphr, thanks for your interest in this. Let me address a few points first.
I've added a few comments on the PRs, but overall they seem ok to me.
Actually it is - you can set
Not sure I understand the problem here - there are quite a few ways to configure a
While I can see the value of such method, isn't this equivalent to
In the latest versions this has been extracted to a
Yes, this feature was implemented based on the
As far as I'm aware, the team is looking into making some redesign work for this feature for the upcoming 3.0 version. As a first time framework contributor, while the feature seems to be working quite well and thankfully probably helping out lots of users all around, there were some design decisions I made that are not in sync with So while the simple fixes you're proposing in the Of course, that's up to @garyrussell and @artembilan - I should be available for input should this proceed. Thanks. |
Beta Was this translation helpful? Give feedback.
-
At Flowable (an Open Source Java business process management platform) we are using a programmatic approach to register Kafka Listeners using Spring Kafka. This is done using a standard (for us) json configuration, that allows users to dynamically deploy listeners during the runtime of the application. We are really happy that we were able to provide our integration using Spring Kafka, it made it really easy for us, thanks a lot for working on this library.
Until now it has been straightforward to use Spring Kafka to satisfy our limited registration use case. Recently we had requests to provide Retry / Dead Letter semantics to our integration. We had a look at the current offer from Spring Kafka and the capabilities have been amazing. Therefore, we decided to use it for this as well.
However, we hit some problems using the Java APIs for this. We managed to achieve this functionality in flowable/flowable-engine@ea5da9c and everything that is needed for Kafka is done in https://github.com/flowable/flowable-engine/tree/main/modules/flowable-event-registry-spring/src/main/java/org/flowable/eventregistry/spring/kafka. In this discussion I'd like to go over some things that we faced during the implementation, discuss potential changes in the Java API and whether you are interested in such contributions.
AcknowledgingConsumerAwareMessageListener
. I have provided Setting up the backoff aware message listener adapter should work for any message listener #2313 to fix thisRetryTopicConfigurationBuilder#autoStartDltHandler
does not work when the application context is refreshed because the registry starts all newly registered containers when the context has already been refreshed.DestinationTopic.Properties
e.g. there isisDltTopic
andisMainTopic
there, but noisAnyRetryTopic
RetryTopicConfiguration
had to be copied to mimic what is done in Spring Kafka (I know that this is copied from Spring Retry here)DefaultDestinationTopicProcessor#processDestinationTopicProperties
felt a bit strange. It feels like it is tailored a lot towards the needs of the annotation based approach. I am not sure what the best approach for this would be though.Having said all of this. I would really like to use this opportunity to discuss whether providing an easier to use Java APIs is something that Spring Kafka would like to do. I am able to carve out some time and work on some things that would simplify our usage of the Spring Kafka Java API in regard to the retry topic configuration.
From a general point of view I think that what could be interesting is to have a way for creating a collection of
KafkaListenerEndpoint
(s) and their appropriateKafkaListenerContainerFactory
. Something close to whatRetryTopicConfigurer#processMainAndRetryListeners
does, but without the registration and the link to theMethodKafkaListenerEndpoint
. Perhaps there is a need to provide different customizers, that would create theKafkaListenerEndpoint
, perhaps expose aRetryableKafkaListenerEndpoint
that would expose some setters that are needed to copy things from the main endpoint to the new one.Looking forward to hearing from you
Beta Was this translation helpful? Give feedback.
All reactions