Priority queue doesn't seem to work

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Priority queue doesn't seem to work

kevin lettier
Hi,

I'm using Rabbitmq 3.3.1 that I upgraded from version 3.2.4
I installed rabbitmq-priority-queue plugin, enable it, and finally restart Rabbitmq server.
When I list rabbitmq plugins I see => [E] rabbitmq_priority_queue 3.3.x-27a9492d

When I'm running Java example from GitHub (with 'x-max-priority' arg set on queue) the messages are received in the same order as I sent them.

See output:
Sent message with priority 3
Sent message with priority 0
Sent message with priority 5
Sent message with priority 10
Received message with priority 3
Received message with priority 0
Received message with priority 5
Received message with priority 10

Any idea what I'm doing wrong ?

Thanks,

Kévin




_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Simon MacMullen-2
On 20/05/2014 9:30AM, kevin lettier wrote:
> When I'm running Java example from GitHub (with 'x-max-priority' arg set
> on queue) the messages are received in the same order as I sent them.

First guess: could you have declared the queue beforehand with the
'x-max-priority' argument not set, or with it set but the plugin not
installed?

Cheers, Simon

--
Simon MacMullen
RabbitMQ, Pivotal
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Matthias Radestock-3
On 20/05/14 09:35, Simon MacMullen wrote:
> On 20/05/2014 9:30AM, kevin lettier wrote:
>> When I'm running Java example from GitHub (with 'x-max-priority' arg set
>> on queue) the messages are received in the same order as I sent them.
>
> First guess: could you have declared the queue beforehand with the
> 'x-max-priority' argument not set, or with it set but the plugin not
> installed?

...or perhaps the consumer was created before the publisher, so the
messages just went straight through.

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

kevin lettier
I use the Java example so the queue was created once with 'x-max-priority' arg set to 10
I deleted the queue and re-launch the code but unfortunately it does not work :(


2014-05-20 10:40 GMT+02:00 Matthias Radestock <[hidden email]>:
On 20/05/14 09:35, Simon MacMullen wrote:
On 20/05/2014 9:30AM, kevin lettier wrote:
When I'm running Java example from GitHub (with 'x-max-priority' arg set
on queue) the messages are received in the same order as I sent them.

First guess: could you have declared the queue beforehand with the
'x-max-priority' argument not set, or with it set but the plugin not
installed?

...or perhaps the consumer was created before the publisher, so the messages just went straight through.

Matthias.


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Matthias Radestock-3
On 20/05/14 10:01, kevin lettier wrote:
> I use the Java example so the queue was created once with
> 'x-max-priority' arg set to 10
> I deleted the queue and re-launch the code but unfortunately it does not
> work :(

You didn't respond to my question/suggestion, namely that perhaps a
consumer exists when the messages are published, in which case the
published messages are passed straight to that consumer, with no
opportunity for the priority queue to re-order the messages since no
messages actually ever get enqueued.

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

kevin lettier
No consumer exists when I sent the messages, I put a break point in the code and see that messages are correctly enqueue (I see them in Management plugin) and dequeue when I continue the execution of the program.
I tried Reset Rabbitmq on my server and re-configure it but nothing change.


2014-05-20 11:06 GMT+02:00 Matthias Radestock <[hidden email]>:
On 20/05/14 10:01, kevin lettier wrote:
I use the Java example so the queue was created once with
'x-max-priority' arg set to 10
I deleted the queue and re-launch the code but unfortunately it does not
work :(

You didn't respond to my question/suggestion, namely that perhaps a consumer exists when the messages are published, in which case the published messages are passed straight to that consumer, with no opportunity for the priority queue to re-order the messages since no messages actually ever get enqueued.

Matthias.


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Matthias Radestock-3
On 20/05/14 10:34, kevin lettier wrote:
> No consumer exists when I sent the messages, I put a break point in the
> code and see that messages are correctly enqueue (I see them in
> Management plugin) and dequeue when I continue the execution of the program.

What happens when you use the management UI to create the queue, publish
and fetch messages? Do priorities work fine then?

Matthias.
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

kevin lettier
No, same results, no priority is applied


2014-05-20 11:40 GMT+02:00 Matthias Radestock <[hidden email]>:
On 20/05/14 10:34, kevin lettier wrote:
No consumer exists when I sent the messages, I put a break point in the
code and see that messages are correctly enqueue (I see them in
Management plugin) and dequeue when I continue the execution of the program.

What happens when you use the management UI to create the queue, publish and fetch messages? Do priorities work fine then?

Matthias.


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Simon MacMullen-2
On 20/05/2014 11:01AM, kevin lettier wrote:
> No, same results, no priority is applied

OK, we'll have to debug this then. Can you send me the output of
"rabbitmqctl report" with the plugin enabled and a supposed priority
queue declared?

I will also look at adding better diagnostics to the plugin, currently
it doesn't tell you much.

Cheers, Simon

--
Simon MacMullen
RabbitMQ, Pivotal
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Priority queue doesn't seem to work

Simon MacMullen-2
On 20/05/2014 11:11AM, Simon MacMullen wrote:
> OK, we'll have to debug this then. Can you send me the output of
> "rabbitmqctl report" with the plugin enabled and a supposed priority
> queue declared?

(And for everyone else following this thread, it turned out to be a
permission problem.)

> I will also look at adding better diagnostics to the plugin, currently
> it doesn't tell you much.

I will still do this though.

Cheers, Simon

--
Simon MacMullen
RabbitMQ, Pivotal
_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss