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 am new to amqp10 and I use this code to receive messages:
amqpClient.createReceiver(queueName).then(r => {
r.on('message', message => {
let subscriberMessage = new SubscriberMessage();
subscriberMessage.body = message.body;
this.handleMessage(subscriberMessage);
});
this works great for most cases, but I noticed that if 100 messages come into the queue at once, r.on message will fire 100 times immediately and all results get processed at the same time.
I'm looking for a way to only have the receiver process one message at a time. I read the docs, but don't really understand how to make this happen. I'm hoping there is simple change I can make to the policy somewhere. Any guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
I am new to amqp10 and I use this code to receive messages:
amqpClient.createReceiver(queueName).then(r => {
r.on('message', message => {
let subscriberMessage = new SubscriberMessage();
subscriberMessage.body = message.body;
this.handleMessage(subscriberMessage);
});
this works great for most cases, but I noticed that if 100 messages come into the queue at once, r.on message will fire 100 times immediately and all results get processed at the same time.
I'm looking for a way to only have the receiver process one message at a time. I read the docs, but don't really understand how to make this happen. I'm hoping there is simple change I can make to the policy somewhere. Any guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: