On 06/09/2011 02:00 PM, Pavel Moravec wrote:
Hello all,
I am playing with --limit-policy flow-to-disk option when creating qpid queues 
but it seems that the option is not applied when it should.

My steps:
$ service qpidd restart
$ qpid-config add queue my-queue --limit-policy=flow-to-disk 
--max-queue-count=90
$ qpid-config queues
Queue Name Attributes
==================================================
my-queue --max-queue-count=90 --limit-policy=flow-to-disk
..
$ # ok, queue created with the desired parameters.
$ # Let use standard C++ spout program to send there 100 messages
$ ./spout -c 100 my-queue
2011-06-09 14:53:08 warning Exception received from broker: 
resource-limit-exceeded: resource-limit-exceeded: resource-limit-exceeded: 
Policy exceeded on my-queue, policy: size: max=104857600, current=0; count: 
max=90, current=90; type=reject (qpid/broker/QueuePolicy.cpp:87) [caused by 93 
\x00:\x00]
2011-06-09 14:53:08 warning Exception received from broker: 
resource-limit-exceeded: resource-limit-exceeded: resource-limit-exceeded: 
Policy exceeded on my-queue, policy: size: max=104857600, current=0; count: 
max=90, current=90; type=reject (qpid/broker/QueuePolicy.cpp:87) [caused by 1 
\x00:\x00]
Failed to connect (reconnect disabled)
$

I.e. when sending>90 messages without reading any one, qpid rejects the 
messages coming over limit. Despite --limit-policy settings.

I have tested this both on qpid 0.7 and qpid 0.10 with the same result. Is the 
limit-policy option broken (I don't suppose so..)? Or what error I did?

Not entirely obvious, but you need to make the queue durable for the flow-to-disk option to have any effect.

Should probably raise an error when creating a non-durable queue with that policy rather than ignoring it.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to