Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to implements a custom kafka failure strategy?

49 views
Skip to first unread message

Johnny Miller

unread,
Sep 29, 2023, 1:11:27 AM9/29/23
to SmallRye
Hi Everyone,

I have a use case where certain errors in my Kafka processing have to be routed to a certain topic eg ExceptionA goes to errortopic, everythng else just nacks as usual.

I have built this using Emitters within my Consumer, but this is not ideal as I have lots and lots of consumer/producers etc.. 

I was looking at a custom failure strategy  (https://smallrye.io/smallrye-reactive-messaging/4.10.0/kafka/receiving-kafka-records/#custom-commit-and-failure-strategies) to do this instead. However all it says is "Similarly, custom failure strategies can be configured using failure-strategy attribute." without any information, details etc.. I have been digging around trying to figure it out but I am not making any progress as there seems to be no examples or docs on doing this for failures - just commit strategies.

I am probably missing something but if anyone has any pointers or examples for how to do this, I would appreciate it.

Thanks,

Johnny


Johnny Miller

unread,
Sep 29, 2023, 1:20:12 AM9/29/23
to SmallRye
p.s - I have asked this in Zulip also
Reply all
Reply to author
Forward
0 new messages