Open swilliams-a3digital opened 6 years ago
This repo is not actively being maintained or supported. I would recommend using rhea which is actively supported and has lesser issues.
I figure it out with this. this.amqpClient.createReceiver(queueName, { creditQuantum : 1, attach: { receiverSettleMode: 1 } }).then(r => {
thanks for tip about this library being dead.
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.