-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix amq router race condition #59
Conversation
Add retries when starting AMQP server to deal with the race condition when AMQP router starts later than cloud-event-proxy service, for example when a node is rebooted. Signed-off-by: Jack Ding <[email protected]>
if instance == nil || instance.Router == nil { | ||
return nil, errorhandler.AMQPConnectionError{Desc: "amqp connection error"} | ||
return nil, errorhandler.AMQPConnectionError{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removed description ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text might be used for parsing some where
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AMQPConnectionError
itself already has description.
Before removing description:
ERRO[0000] error starting amqp at amqp:localhost:5672 error: amqp connection error amqp connection error
WARN[0000] requires QPID router installed to function fully amqp connection error amqp connection error
After removing description:
ERRO[0000] error starting amqp at amqp:localhost:5672 error: amqp connection error
WARN[0000] requires QPID router installed to function fully amqp connection error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
/cherrypick release-4.12 |
/cherry-pick release-4.12 |
Add retries when starting AMQP server to deal with the race condition when AMQP router starts later than cloud-event-proxy service, for example when a node is rebooted.
Timeout for retry duration is set to 30 seconds.
Signed-off-by: Jack Ding [email protected]