-
Notifications
You must be signed in to change notification settings - Fork 56
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
Duplicate on message handlers. #358
Comments
I have the same issue. |
@tony-gutierrez I get the same issue. But when I pause for a while/ use nextTick in the event function, it do not raise duplicated message again. Here's my workaround. let client = null;
function createReceivers() {
// create receiver links
}
async function reconnectClient() {
client = new AMQP.Client(policy);
client.on('connection:opened', async function(){
logger.info('[ListenConn]: opened');
process.nextTick(createReceivers);
});
try{
await amqpConnListen.connect(config['MQ_CONNECT_STRING']);
}catch(err){
logger.error(err);
}
} |
… after all operations ?
Have you tried listening to the |
I have to use logic in a 'connection:opened' handler to send a sas token.
If I do anything with the client in this 'connection:opened' event handler, I get two calls to my "on message" handler, regardless of where my receiver was created. I have verified I am only creating one receiver, once.
The text was updated successfully, but these errors were encountered: