1
votes

I have Spring Cloud Stream Rabbit project that sends messages to an rabbit exchange errorEx in case of errors in the flow. I want to periodically(once in 5 mins) listen from the queue and process it.

Is there any way I can have a Pollable @StreamListener? OR Can I configure a rabbitMQ org.springframework.integration.core.MessageSource so I can build a IntegrationFlow with a Poller?

1

1 Answers

0
votes

Spring Integration AMQP doesn't provide a pollable adapter. @StreamListener only supports Subscribable channels.

You could use a custom MessageSource that uses a RabbitTemplate receive() operation to fetch messages.

Or, you could use the message-driven adapter and stop()/start() it as needed.