2015-06-30 63 views
1

我使用RabbitMQ創建代理並在儀表板屏幕上的enpoint區域顯示: 警告:EPR爲NULL。交通運輸配置可能不正確帶有Rabbit MQ的WSO2 - 警告:EPR爲NULL。傳輸配置可能不正確

這裏是我的配置:

<?xml version="1.0" encoding="UTF-8"?> 
<proxy xmlns="http://ws.apache.org/ns/synapse" 
     name="RabbitMqProxy" 
     transports="rabbitmq" 
     statistics="enable" 
     trace="enable" 
     startOnLoad="true"> 
    <target> 
     <inSequence> 
     <log level="full"/> 
     <property name="OUT_ONLY" value="true"/> 
     <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/> 
     </inSequence> 
     <endpoint> 
     <address uri="rabbitmq:/RabbitMqProxy?rabbitmq.server.host.name=199.53.215.101&amp;rabbitmq.server.port=5672&amp;rabbitmq.server.user.name=guest&amp;rabbitmq.server.password=guest&amp;rabbitmq.queue.name=intraday.oms.message;rabbitmq.exchange.name=test-topic"/> 
     </endpoint> 
    </target> 
    <parameter name="rabbitmq.queue.name">intraday.oms.message</parameter> 
    <parameter name="rabbitmq.server.virtual.host">/carbon</parameter> 
    <parameter name="rabbitmq.connection.factory">AMQPConnectionFactory</parameter> 
    <parameter name="rabbitmq.exchange.name">test-topic</parameter> 
    <description/> 
</proxy> 

我想不出有什麼錯,但是當我遵循Windows樣品我不能在用戶側收到任何消息,也許這是問題。

+0

嗨盧卡斯,你能RabbitMQ的transportReceiver在axis2.xml? (https://docs.wso2.com/display/ESB481/RabbitMQ+AMQP+Transport#RabbitMQAMQPTransport-安裝RabbitMQAMQPTransport) – Chamila

+0

是的,因爲它是啓用的: ' 199.53.215.101 <參數名稱=「rabbitmq.server.port」locked =「false」> 5672 guest guest ' –

+0

我的錯誤。我應該詢問有關transportSender的問題,但我想你也配置了這個部分。我可以找到一篇博客文章,其中表示安裝RabbitMQ的傳輸配置不起作用,並且必須手動複製罐子。你能檢查'axis2-transport-rabbitmq-amqp * .jar'和'amqp-client * .jar'的repository/components/lib'文件夾嗎? (https://luispenarrubia.wordpress.com/2014/12/10/integrate-wso2-esb-and-rabbitmq-using-amqp-transport/) – Chamila

回答

0

對於RabbitMQ消費者rabbitmq.server.virtual.host不是代理的參數,而是連接工廠的參數。

所以,你應該進行額外的連接工廠axis2.xml:

<transportReceiver name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQListener"‌​> 
    <parameter name="AMQPConnectionFactory" locked="false"> 
     <parameter name="rabbitmq.server.host.name" locked="false">199.53.215.101</parameter> 
     <parameter name="rabbitmq.server.port" locked="false">5672</parameter> 
     <parameter name="rabbitmq.server.user.name" locked="false">guest</parameter> 
     <parameter name="rabbitmq.server.password" locked="false">guest</parameter> 
    </parameter> 
    <parameter name="AMQPConnectionFactoryCarbon" locked="false"> 
     <parameter name="rabbitmq.server.host.name" locked="false">199.53.215.101</parameter> 
     <parameter name="rabbitmq.server.port" locked="false">5672</parameter> 
     <parameter name="rabbitmq.server.virtual.host">/carbon</parameter> 
     <parameter name="rabbitmq.server.user.name" locked="false">guest</parameter> 
     <parameter name="rabbitmq.server.password" locked="false">guest</parameter> 
    </parameter> 
</transportReceiver> 

,並更改代理服務器的參數列表到如下:

<parameter name="rabbitmq.queue.name">intraday.oms.message</parameter> 
<parameter name="rabbitmq.connection.factory">AMQPConnectionFactoryCarbon</parameter> 
<parameter name="rabbitmq.exchange.name">test-topic</parameter> 
相關問題