Hey @akg17
Thanks for your patience while we worked this out. If I understood your question, you were asking how to poll a DLQ on-demand when using Spring Cloud Stream.
I’ve posted a demo on the Solace Github that details how to go about doing this.
The general approach is as follows:
- Define a pollable source (the queue you want to poll) in
application.properties
, along with the number of messages to get on each poll. - Instantiate
PollableMessageSource
to get a reference to the queue in your code - Invoke the
poll
method onPollableMessageSource
as needed to get data.