Mule ESB connecting to RabbitMQ

心不动则不痛 提交于 2019-12-12 18:18:48

问题


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?


回答1:


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>



回答2:


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.



来源:https://stackoverflow.com/questions/34225683/mule-esb-connecting-to-rabbitmq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!