You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using @golevelup/nestjs-rabbitmq version 5.7.0 and ran into an issue where the application crashes on startup if RabbitMQ is unavailable, even when connectionInitOptions.wait is set to false.
Here’s a simplified version of the module configuration:
My understanding from the docs and the underlying amqp-connection-manager is that wait: false should allow the application to boot even if RabbitMQ is not reachable at startup. However, in practice, the app still throws an exception and fails to start when RabbitMQ is down.
It seems like the issue is related to createExchangeIfNotExists: true, since the library tries to assert the exchange on startup regardless of the connection status. This makes wait: false ineffective in real-world scenarios where availability might be intermittent and resilience is important.
Is this the intended behavior? Is there a workaround or planned improvement to make this option truly non-blocking?
Thanks in advance and great work on the library 🙌
The text was updated successfully, but these errors were encountered:
I think what you're describing totally makes sense and we may be asserting exchanges/throwing if the client is not available, which would be the case when the connection is not established.
It would make sense to create the exchange once the connection is available but the reality is that it is more complicated than that as we need to setup a bunch of stuff around the channels.
I'm open to alternative suggestions such as creating the exchange once the connection is available instead of trying to do that immediately when wait is set to false.
Hi! 👋
I'm currently using @golevelup/nestjs-rabbitmq version 5.7.0 and ran into an issue where the application crashes on startup if RabbitMQ is unavailable, even when connectionInitOptions.wait is set to false.
Here’s a simplified version of the module configuration:
My understanding from the docs and the underlying amqp-connection-manager is that wait: false should allow the application to boot even if RabbitMQ is not reachable at startup. However, in practice, the app still throws an exception and fails to start when RabbitMQ is down.
It seems like the issue is related to createExchangeIfNotExists: true, since the library tries to assert the exchange on startup regardless of the connection status. This makes wait: false ineffective in real-world scenarios where availability might be intermittent and resilience is important.
Is this the intended behavior? Is there a workaround or planned improvement to make this option truly non-blocking?
Thanks in advance and great work on the library 🙌
The text was updated successfully, but these errors were encountered: