AMQP: limit messages dequeued when selfAck=false
Hi,
I've been working with the rabbitmq beta on heroku and had a show-stopper problem where all message passing appeared to block. The rabbitmq guys where really helpful, and we tracked down the problem to akka.amqp.AMQP.newConsumer defaulting to pulling as many messages from the queue as it can. When I added a channelParameters to the ConsumerParameters and limited prefetchSize to 20, everything became well-behaved again.
From this experience I have a couple of suggestions. Firstly, could who ever owns the example akka/rabbitmq/heroku application update it so that the client supplies ChannelParameters in the ConsumerParameters for newConsumer? That way, noobs who just copy/paste things to get anything running won't be bitten by this. Secondly, for the akka-amqp devs, would it be sensible to modify the behaviour of newConsumer so that if no channelParameters is supplied, it uses some (system wide?) default cap on the number of unacknowledged messages, at least for consumers set up with selfAcknowledging=false.
Thanks,
Matthew
I've been working with the rabbitmq beta on heroku and had a show-stopper problem where all message passing appeared to block. The rabbitmq guys where really helpful, and we tracked down the problem to akka.amqp.AMQP.newConsumer defaulting to pulling as many messages from the queue as it can. When I added a channelParameters to the ConsumerParameters and limited prefetchSize to 20, everything became well-behaved again.
From this experience I have a couple of suggestions. Firstly, could who ever owns the example akka/rabbitmq/heroku application update it so that the client supplies ChannelParameters in the ConsumerParameters for newConsumer? That way, noobs who just copy/paste things to get anything running won't be bitten by this. Secondly, for the akka-amqp devs, would it be sensible to modify the behaviour of newConsumer so that if no channelParameters is supplied, it uses some (system wide?) default cap on the number of unacknowledged messages, at least for consumers set up with selfAcknowledging=false.
Thanks,
Matthew
Leave a comment
Updating tickets (#1129, #1132, #1138, #1149, #1153, #1154, #1157, #1161, #1163, #1168, #1170, #1171, #1172, #1176, #1177, #1178, #1180, #1199, #1217, #1218, #1219, #1237, #1238, #1239, #1244, #1246, #1249, #1250, #1251, #1252, #1256, #1301, #1302, #1306, #1395, #1396, #1409, #1418, #455, #891, #895, #912, #956, #972, #1031, #1374, #880, #1125, #1146)