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: Connection Resiliency functions in unexpected manner #203

Open
ssilve1989 opened this issue Nov 16, 2020 · 2 comments
Open

RabbitMQ: Connection Resiliency functions in unexpected manner #203

ssilve1989 opened this issue Nov 16, 2020 · 2 comments

Comments

@ssilve1989
Copy link

Current Functionality

Currently it looks like the only way connection resiliency is supported is through setting wait: false on the connectionInitOptions. This results in the Nest service reporting that it has been successfully bootstrapped even though a Rabbit connection may have not been established. This results in application lifecycle events, like, onApplicationBootstrap being triggered before a rabbit connection could be established placing the burden of verifying the connection onto a consumer (some module injecting AmqpConnection)

Expected Functionality

Instead, I would expect additional functionality to be available, similar to that of the @nestjs/typeorm module where the module does not report it is ready until a connection is successfully established. The current property wait when set to true is misleading, in that it does not wait for a connection, instead it just fails if a connection cannot be established within the timeout period

[ERROR] 39404 - 11/16/2020, 7:51:41 AM [Nest] Failed to connect to a RabbitMQ broker within a timeout of 30000ms
Error: Failed to connect to a RabbitMQ broker within a timeout of 30000ms

resulting in the application crashing. There should be additional properties, as requested here #200 that alongside the wait:true property allow for attempting to connect up to N times with some delay before throwing an error.

@dimauloagustin
Copy link

same issue here!!

Copy link

github-actions bot commented Oct 4, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants