Exception management of ReplyingKafkaTemplate using Kafka Streams

Viewed 87

Because of business requirements, we need to use a ReplyingKafkaTemplate with Kafka Streams playing the role of the consumer. We want to provide a support for exception management such that it is possible to escalate errors as part of the future response. We saw that the onMessage() method of this listener already handles deserialization errors and sets the exception on the future accordingly. We would like to enhance this behavior with more exceptions, but we couldn’t find any hook points. Is there any other location in the code where we can extend the implementation, or else do you think you might create an entry point for that?

Thank you for your help.

1 Answers

If you mean the server side returns errors by some means (headers etc), no, there is currently no extension point for that use case, but it will be trivial to add support for that.

Please open a feature request https://github.com/spring-projects/spring-kafka/issues

We should be able to get it into next week's 2.6.7 release.

Related