[rabbitmq-discuss] .NET Client - PublishConfirms and batching Acks
marty.wasznicky at neudesic.com
Tue Feb 25 20:20:25 GMT 2014
I'm using the .NET client and attempting to get performance from using PublishConfirms. To date, I don't see much performance over using the txConfirm model though. Hence, I'm wondering if I'm doing something wrong.
I'm creating the Connection and Model and then calling ConfirmSelect()
Then in a tight loop, I'm publishing messages like so:
var deliveryTag = 0UL;
deliveryTag = this.model.NextPublishSeqNo;
this.activeMessages[deliveryTag] = message;
On the consumer side I'm doing the following for receiving the messages:
consumerModel = this.connection.CreateModel();
consumerModel.BasicQos(0, 1, false);
var consumer = new QueueingBasicConsumer(consumerModel);
var consumerTag = consumerModel.BasicConsume(
BasicDeliverEventArgs item = null;
if (!consumer.Queue.Dequeue(3000, out item))
connectionClosed = true;
if (null == item)
Unfortunately this is really slow. Is there some property I'm missing that I can use to increase performance? Since I'm setting the "multiple" flag to True in the BasicAck, I tried to call that on every 100 or 1000th message....but I found if an ack isn't sent, I'm not allowed to read another message off the queue.
Confidentiality Notice: This email and any attachments are confidential. If you have received this in error, please let us know by email reply and delete the email and all attachments from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss