Repository navigation
Feature/amqps support 2233 - #2247
Gautam-aman wants to merge 5 commits into
Conversation
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
dipak0000812
left a comment
There was a problem hiding this comment.
One concern with making the initial connection failure non-fatal: setAutomaticRecoveryEnabled(true) does not retry an initial newConnection() failure. If the broker is unavailable when the minion starts, amqpConnection remains null, and the new guard in publishMessage() will skip subsequent publishes even after the broker becomes available.
Could we add a retry/reconnect path for the initial connection, or otherwise clarify how the producer is expected to recover in this case?
There was a problem hiding this comment.
What happens if an established AMQP connection is lost while publishMessage() is running? The current guard only checks for null. Could we also handle a closed connection explicitly so a broker interruption doesn't result in an unexpected failure from createChannel()?
Signed-off-by: Aman Gautam <[email protected]>
I think it's better not to recover here. If the connection fails, that means that it's either a configuration or a unavailability issue. In both case, it's better to fail early and as we are in a
I tend to think that we should keep it simple here: publication fails, probe fails and the minion container restarts until the connection is OK again. It's better to die early and keep recovery simple IMHO. Don't bother with this here. |
|
@Gautam-aman Any follow-up on the previous review? Let us know. |
|
No i have stopped working on this. |
Ok noted. Thanks for the quick response. I'll close the PR to let someone pick up the topic again. |
Summary
This PR improves the AMQP producer used by the async minion by:
amqp://andamqps://URIs.amqps://when the configured broker uses port5671.Changes
buildAmqpUri()to centralize AMQP URI creation.createConnection()to use the generated URI.publishMessage()to safely skip publishing when no broker connection exists.amqp://URI generation5672)5671)amqp://URIsamqps://URIsTesting
mvn spotless:applyFixes #2233