amqp ssl连接错误

时间:2015-08-06 09:06:52

标签: ssl mule amqp

您好我正在尝试创建一个非常简单的AMQP连接器,以使用SSL与我的localhost RabbitMQ服务器通信。没有SSL,连接正常,但我怀疑我的SSL配置不正确。任何人都可以阐明这一点吗?我是骡子的新手,如果这太荒谬了,请道歉。

                                         

</ssl:connector>
<flow name="here_we_go_againFlow1">
    <amqp:inbound-endpoint exchangeName="sales_exchange" queueName="sales_queue" responseTimeout="10000" exchange-pattern="request-response" connector-ref="AMQP_0_9_Connector" doc:name="AMQP-0-9" ref="AMQP_0_9"/>
    <ssl:outbound-endpoint host="localhost" port="5671" responseTimeout="10000" doc:name="SSL (TLS)"/>
    <echo-component doc:name="Echo"/>
</flow>

1 个答案:

答案 0 :(得分:-1)

我假设您尝试通过SSL连接到AMQP服务器。以下是使用ampqs传输的示例。注意命名空间等。

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:amqps="http://www.mulesoft.org/schema/mule/amqps" xmlns:spring="http://www.springframework.org/schema/beans"
    xsi:schemaLocation="
       http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
       http://www.mulesoft.org/schema/mule/amqps http://www.mulesoft.org/schema/mule/amqps/current/mule-amqps.xsd
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <amqps:connector name="amqpsDefaultSslConnector" />

    <flow name="amqp">
        <amqps:inbound-endpoint exchangeName="target-exchange"
         exchangeType="fanout" exchangeDurable="true" exchangeAutoDelete="false"
         queueName="target-queue" queueDurable="true" queueAutoDelete="false"
         queueExclusive="true" routingKey="a.b.c" connector-ref="amqpsDefaultSslConnector" />

     ....
     </flow>
</mule>

还有更高级的配置,例如设置密钥库等。例如:https://github.com/mulesoft/mule-transport-amqp/blob/master/mule-transport-amqp/src/test/resources/amqps-namespace-config.xml