Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rabbitmq producer retry #951

Closed
tajdars opened this issue May 9, 2017 · 3 comments
Closed

rabbitmq producer retry #951

tajdars opened this issue May 9, 2017 · 3 comments

Comments

@tajdars
Copy link

tajdars commented May 9, 2017

spring-cloud-stream-binder-rabbit: 1.2.0.M1

org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.createProducerMessageHandler

This method doesn't set any retry properties on RabbitTemplate

spring.rabbitmq.template.retry.*

How does the producer retry a failed publish (caused by for example a broker restart) ?

Thanx,

@artembilan
Copy link
Contributor

From an external discussion:

I’m noticing some unexpected behavior when trying to publish a message to RabbitMQ via Spring Cloud Stream. I’m using a TCP load balancer to balance connections between nodes in the RabbitMQ cluster. I’m testing the situation in which a node goes down but for a brief period the load balancer might still route requests to that node. In that case, the publisher, if routed to the down node fails to establish a connection and throws an exception. This is unexpected because I have spring.rabbitmq.template.retry.enabled: true set, which I expected would cause it to retry even if the connection attempt failed the first time. In fact, if I try using the auto-configured RabbitTemplate directly without Spring Cloud Stream, it is exhibiting the behavior I expect: a WARN log is published for the initial connection failure but it retries and the load balancer routes to the good node, a connection is established, and the message is successfully published.

IMO should be moved to the https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues

//CC @shakuzen

@tajdars
Copy link
Author

tajdars commented May 10, 2017

Thanx @artembilan. Yup i agree. Will you be moving this ?

@artembilan
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants