I tried to install rabbitmq-priority-queue on my ubuntu 12.04 machine which is running rabbitmq 3.4.0.
according to the instructions in http://www.rabbitmq.com/installing-plugins.html, I've copied the downloaded file rabbitmq_priority_queue-3.4.x-3431dc1e.ez to /usr/lib/rabbitmq/lib/rabbitmq_server-3.4.0/plugins and enabled the plugin via command:
$ sudo rabbitmq-plugins enable rabbitmq_priority_queue
when running the example application in https://github.com/rabbitmq/rabbitmq-priority-queue/blob/master/examples/java/src/com/rabbitmq/examples/PriorityQueue.java I got the following output:
Sent message with priority 0
Sent message with priority 5
Sent message with priority 10
Received message with priority 0
Received message with priority 5
Received message with priority 10
although I expect the output to be:
Sent message with priority 0
Sent message with priority 5
Sent message with priority 10
Received message with priority 10
Received message with priority 5
Received message with priority 0
which means, consume the highest priority message first.
I've tried to do the following (none worked):
- restarted rabbit
- disabled-enabled the plugin
- deleted the queue (so it would be recreated by the app)
- changed .ez file permissions to -rw-r--r-- (just like all other plugins)
I've noticed that when I'm enabling the plugin I get the following output:
$ sudo rabbitmq-plugins enable rabbitmq_priority_queue
The following plugins have been enabled:
rabbitmq_priority_queue
Applying plugin configuration to rabbit@<my laptop name>...WARNING: module rabbit_priority_queue not found, so not scanned for boot steps.
WARNING: module rabbit_priority_queue not found, so not scanned for boot steps.
started 1 plugin.
But when running 'sudo rabbitmq-plugins list' I get:
$ sudo rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@benny-laptop
|/
[e*] amqp_client 3.4.0
[ ] cowboy 0.5.0-rmq3.4.0-git4b93c2d
[ ] eldap 3.4.0-gite309de4
[e*] mochiweb 2.7.0-rmq3.4.0-git680dba8
[ ] rabbitmq_amqp1_0 3.4.0
[ ] rabbitmq_auth_backend_ldap 3.4.0
[ ] rabbitmq_auth_mechanism_ssl 3.4.0
[ ] rabbitmq_consistent_hash_exchange 3.4.0
[ ] rabbitmq_federation 3.4.0
[ ] rabbitmq_federation_management 3.4.0
[E*] rabbitmq_management 3.4.0
[e*] rabbitmq_management_agent 3.4.0
[ ] rabbitmq_management_visualiser 3.4.0
[ ] rabbitmq_mqtt 3.4.0
[E*] rabbitmq_priority_queue 3.4.x-3431dc1e
[ ] rabbitmq_shovel 3.4.0
[ ] rabbitmq_shovel_management 3.4.0
[ ] rabbitmq_stomp 3.4.0
[ ] rabbitmq_test 3.4.0
[ ] rabbitmq_tracing 3.4.0
[e*] rabbitmq_web_dispatch 3.4.0
[ ] rabbitmq_web_stomp 3.4.0
[ ] rabbitmq_web_stomp_examples 3.4.0
[ ] sockjs 0.3.4-rmq3.4.0-git3132eb9
[e*] webmachine 1.10.3-rmq3.4.0-gite9359c7
According to the result [E*] it looks like the plugin is enabled. I'm not sure if the plugin was enabled properly, or maybe I don't understand it correctly. Please advise.