[rabbitmq-discuss] php rabbitmq Per-Message TTL Issue

dredger andrew.dulev.mmo at gmail.com
Wed Feb 5 13:11:15 GMT 2014

I'm using different "Per Message TTL" in RabbitMQ queue, and I expect that 
messages with different TTL should be processed by consumer in due time.

To provide this behaviour, I use RabbitMQ queue with huge "x-message-ttl", 
I add messages to this queue with own value of "Per Message TTL"(see code 
below). For example add to queue messages with TTL 30, 20 and 10 seconds.

The problem in behaviour, how RabbitMQ process the messages with different 
"Per MessageTTL" in queue, the messages with largest TTL stop the messages 
with less TTL. So consumer process all mesages together, when largest TTL 

*Publish message code:*

$channel = new AMQPChannel($this->connection);    
$exchange = new AMQPExchange($channel);
$ttl = $ttl*1000;    
$params = array('expiration'=>$ttl);    
$message = $exchange->publish($msg, $this->queueNotDelayedName, null, $params);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140205/739472f2/attachment.html>

More information about the rabbitmq-discuss mailing list