Can StreamRabbitListenerContainerFactory message listeners retry messages? #1454
-
Hi, thanks in advance for any help We're using the Our issue is that, as far as I can tell, consumers created by this factory don't support retries
I suspect the problem is that the issue here in StreamMessageListenerAdapter#onStreamMessage where, any exception is just swallowed, so no retry / error logic can be called. So I'm wondering if this streams container factory just doesn't support retries: is this true? Is there some other way to process streams that supports retries, and also follows the offset specification? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The retry template in the listener container factory is for retrying publishing replies (for a request/reply listener). /**
* Set a {@link RetryTemplate} to use when sending replies; added to each message
* listener adapter.
* @param retryTemplate the template.
* @see #setReplyRecoveryCallback(RecoveryCallback)
* @see AbstractAdaptableMessageListener#setRetryTemplate(RetryTemplate)
*/
public void setRetryTemplate(RetryTemplate retryTemplate) {
this.retryTemplate = retryTemplate;
} We don't currently support request/reply for stream listeners. Retries for deliveries in the classic listener containers is implemented using the advice chain (with a retry interceptor https://docs.spring.io/spring-amqp/docs/current/reference/html/#retry); there is currently no advice chain support in the We can look into doing that; please open a new feature issue. In the meantime, you can use a |
Beta Was this translation helpful? Give feedback.
-
Raised as: #1455 |
Beta Was this translation helpful? Give feedback.
The retry template in the listener container factory is for retrying publishing replies (for a request/reply listener).
We don't currently support request/reply for stream listeners.
Retries for deliveries in the classic listener containers is implemented using the advice chain (with a retry interceptor https://d…