Enable/disable consumer on demand #2334
Unanswered
alexpoletaev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to enabled/disable consumer on demand, for example by graphql or rest request? I have a dead letter topic and I want to forward messages from this topic to another one on demand. Documentation says, that I can use
KafkaClientService
, but I didn't find an example how to properly use it. Here is how I'm trying to implement this functionality:DeadLetterResource.java
DeadLetterService.java
First execution works fine, but when I hit graphql mutation second time I'm getting the RejectedExecutionException since the
ScheduledExecutorService is already shutdown. I'm not good in reactive programming, probably it's related somehow to Multi subscription cancellation. Could you please provide me an example, how can I implement this functionality? It would be greate if this will be a "fire and forget" implementation. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions