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
Hello, this is more of a question than an issue as such, but I would like to know please about how to use the amqp client in a long running service.
This has a function that has called regularly on a schedule within the scope of a node.js program, which is run as a service (on ubuntu).
Is it advisable/more efficient to declare the AMQPClient and AMQPChannel in global scope, meaning I only have to connect once at the start of the program, and use them in the function that is called regularly, OR, is it better to declare a new client and channel inside the function?
If the former, is there a way of determining whether the channel is still connected, and reconnecting if not?
Or if the connection drops, does it have the ability to reconnect?
If the latter, is there any inefficiency associated with keep reconnecting again repeatedly?
The text was updated successfully, but these errors were encountered:
Hello, this is more of a question than an issue as such, but I would like to know please about how to use the amqp client in a long running service.
This has a function that has called regularly on a schedule within the scope of a node.js program, which is run as a service (on ubuntu).
Is it advisable/more efficient to declare the
AMQPClient
andAMQPChannel
in global scope, meaning I only have to connect once at the start of the program, and use them in the function that is called regularly, OR, is it better to declare a new client and channel inside the function?If the former, is there a way of determining whether the channel is still connected, and reconnecting if not?
Or if the connection drops, does it have the ability to reconnect?
If the latter, is there any inefficiency associated with keep reconnecting again repeatedly?
The text was updated successfully, but these errors were encountered: