2014-10-30 87 views
2

我試圖在運行rabbitmq 3.4.0的我的ubuntu 12.04機器上安裝rabbitmq-priority-queuerabbitmq-priority-queue插件安裝問題

根據http://www.rabbitmq.com/installing-plugins.html指示,我已經複製下載的文件rabbitmq_priority_queue-3.4.x-3431dc1e.ez到/usr/lib/rabbitmq/lib/rabbitmq_server-3.4.0/plugins 並通過啓用插件命令:

$ sudo rabbitmq-plugins enable rabbitmq_priority_queue 
運行在 https://github.com/rabbitmq/rabbitmq-priority-queue/blob/master/examples/java/src/com/rabbitmq/examples/PriorityQueue.java 示例應用程序,我得到了以下輸出時

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 

雖然我期望的輸出是:

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 

這意味着,首先消耗最高優先級的消息。

我試着做以下(無工作):

  • 重啓兔
  • 插件
  • 刪除隊列(因此​​它由應用程序重新創建)
  • 啓用已禁用,
  • 改變.ez文件權限-rw-R - R--(就像所有其他的插件)

我注意到,當我使plugi n個I得到以下輸出:

$ sudo rabbitmq-plugins enable rabbitmq_priority_queue 
The following plugins have been enabled: 
    rabbitmq_priority_queue 

Applying plugin configuration to [email protected]<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. 

但運行 '須藤的RabbitMQ-插件列表' 時,我得到:

$ sudo rabbitmq-plugins list 
Configured: E = explicitly enabled; e = implicitly enabled 
| Status: * = running on [email protected] 
|/ 
[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 

根據結果[E *]它看起來像被啓用該插件。 我不確定該插件是否正確啓用,或者我可能無法正確理解。請指教。

回答

4

啊。是。該「找不到模塊」錯誤消息是誤導性的。網站上提供的優先級隊列插件的二進制版本是使用Erlang R15B編譯的 - 但您的Ubuntu附帶的Erlang版本是R14B04。所以我認爲這是問題的根源。

你可以升級Erlang(Erlang解決方案報價爲12.04的backports,從here開始),或者自己編譯插件(不適合膽小的人)。

與此同時,我會着手讓錯誤信息說出更智能的東西。