Nest js fails to run when RabbitMq is not reachable and the service is using @RabbitSubscribe or @RabbitRPC for listening a queue.
https://github.com/golevelup/nestjs/blob/241a64075e06e15d273994ae786e7d0acec09c31/packages/rabbitmq/src/amqp/connection.ts#L340
Issue is in this function. Have to handle the failure scenario.
I.e, When addSetup fails, function doesn't call the callback instead it returns undefined.
Raised a PR also
https://github.com/golevelup/nestjs/pull/495
@WonderPanda
I have experienced the same issue. When a connection to the RabbitMQ broker cannot be established, the NestJS application fails to start, even with { connectionInitOptions: { wait: false } }. However, after I applied the patch suggested in #495 locally the application started successfully. I would like to begin using this package very soon, so if there is any way that the pull request can get reviewed and merged quickly, I would greatly appreciate it.
@WonderPanda The fix was made only to RabbitSubscribe and not been done to RabbitRPC. Can Raise a merge request for the same?
Sure, feel free to provide the fix and I will merge and publish a new package version
On Tue., Sep. 27, 2022, 7:48 a.m. vijay sundharapandiyan, < @.***> wrote:
@WonderPanda https://github.com/WonderPanda The fix was made only to RabbitSubscribe and not been done to RabbitRPC. Can Raise a merge request for the same?
— Reply to this email directly, view it on GitHub https://github.com/golevelup/nestjs/issues/494#issuecomment-1259385888, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3WVG5OV35CZJGXBCGCOWTWALNJXANCNFSM56FL5VDQ . You are receiving this because you were mentioned.Message ID: @.***>