Spring Cloud Stream Consumer Binding to a DMQ
Hi there
Is there a way to bind a Spring Cloud Stream consumer to a DMQ?
I tried things like that:
failedMessage-in-0: destination: DEAD_MSG_QUEUE contentType: "application/text"
But a consumer always binds to a queue which has a subsciption to the topic (in destination), right?
So this doesn't work.
Is there a solution for this?
Thanks and best regards
Mike
Tagged:
Comments
Hi @Mike13,
Currently the Solace Spring Cloud Stream binder enforces an "opinionated view" where the queue name is dynamically created (or expected to be) as {prefix}{destination}.{group}. We have an enhancement open to allow for this opinion to be overridden, but in the meantime I think I have a solution for you.
I believe this should work for you:
.DMQ
. For example's sake, let's useFOO.DMQ
(Note you can set the DMQ on each queue using SEMP/cli/PS+ Mgr or set up an endpoint template that automatically adds it based on queue naming).
and have your Spring Cloud Stream Binding use the first part (FOO
in our example) as thedestination
and set the group name to be the second part (DMQ
in our example)So your binding config would end up looking like this:
Let me know if it works
Hi @marc
Nice one, this works for me :-).
Thanks!
Awesome, you're very welcome!