简体   繁体   中英

Mule ESB connecting to RabbitMQ

I am new to Mule ESB 3.6(Anypoint Studio Community Edition 5.2). I am working on communication between mule and rabbitmq. rabbitmq support AMQP protocol and mule has connector for AMQP but it work with 3.1 version. Now the question is How to connect if not AMQP from mule?

I have tried older version of AMQP connector with new Mule version but its not working as namespace error is coming. Please help. Maven i am not sure how it works as very less user guide is provided. will JMS work in this case, then how?

I was fortunate to find mystery of AMQP connector. Well i could not see anywhere mentioned in mule documentation regarding installation of same. Well I am using Anypoint Studio - Tooling for Mule ESB Version: 5.1.0

If you are stuck to find how to installation of AMQP connector then he is simple way Go to Help => Install New Software => Select All Available Sites => Select Community Category => Under Community, you will find AMQP Transport connector => Select it, Go saying Yes then accept licence. This will install AMQP Transport connector on your Studio. You can easily use in designing application flow.

To help more regarding configuration of AMQP connector use following reference

<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:amqp="http://www.mulesoft.org/schema/mule/amqp" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/amqp http://www.mulesoft.org/schema/mule/amqp/current/mule-amqp.xsd"> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8082" doc:name="HTTP Listener Configuration"/> <amqp:connector name="AMQP_0_9_Connector" validateConnections="true" virtualHost="abctest" doc:name="AMQP-0-9 Connector"  username="guest" password="guest" /> <flow name="mulerabbitmqFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/myvishaltest/*" allowedMethods="GET" doc:name="HTTP"/> <set-payload value="Test is Vishal" doc:name="Set Payload"/> <amqp:outbound-endpoint responseTimeout="10000" exchange-pattern="request-response" doc:name="AMQP-0-9" connector-ref="AMQP_0_9_Connector" exchangeName="vishalbhandare" exchangeType="direct"  exchangeDurable="true" queueName="task_queue"  queueDurable="true"  queueExclusive="true"   routingKey="vishal1" /> </flow> </mule>

For all connectors, examples and templates head out to:

https://www.mulesoft.com/exchange

Or even easier, open the Exchange from Anypoint Studio

https://docs.mulesoft.com/mule-fundamentals/v/3.7/anypoint-exchange

AMQP can be found here:

https://www.mulesoft.com/exchange/#!/amqp-integration-connector

Via the updates sites in studio is also possible, but the exchange gives you the overview, complete library and description.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM