问题描述
我目前正在尝试使用 Talend open studio for ESB 为 RabbitMQ 队列构建使用者。在阅读了我能找到的关于这个主题的每一篇文章后,我有 2 个不同的版本,但没有一个真正有效。
版本 1:
我的路线:
cmessagingEndpoint1 URI:
"rabbitmq://host:port/exchange?username=xxxxx&password=xxxx&queue=xxxx"
我还尝试向此 URI 添加持久 = true 和 no_declare = true,但随后收到未知参数错误。所以我再次删除了那两个。
cMessagingEndpoint Camel component
[WARN ] 09:29:07 org.apache.camel.component.rabbitmq.RabbitMQComponent- The old Syntax rabbitmq://hostname:port/exchangeName is deprecated. You should configure the hostname on the component or ConnectionFactory
[WARN ] 09:29:08 com.rabbitmq.client.impl.ForgivingExceptionHandler- An unexpected connection driver error occured (Exception message: Connection reset)
[WARN ] 09:29:08 org.apache.camel.component.rabbitmq.RabbitConsumer- Unable to open channel for RabbitMQConsumer. Continuing and will try again
我认为驱动程序错误可能是因为我没有发送“durable: true,no_declare: true”,但我不确定在哪里添加这两个选项。
版本 2:
我的连接工厂
定义的实际队列。
包括durable 和no_declare。这些必须定义,否则我永远无法连接到RabbitMQ服务器
但我再次收到未知参数错误。
org.apache.camel.FailedToCreateRouteException: Failed to create route test_receiveMQMessage_cAMQP_1: Route(test_receiveMQMessage_cAMQP_1)[[From[cMQConnectionFact... because of Failed to resolve endpoint: cMQConnectionFactory1://queue:arcplace?durable=true&no_declare=true due to: Failed to resolve endpoint: cMQConnectionFactory1://queue:arcplace?durable=true&no_declare=true due to: There are 2 parameters that Couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. UnkNown parameters=[{durable=true,no_declare=true}]
有人知道如何解决这个问题并将我的侦听器连接到 RabbitMQ 队列吗?
谢谢
编辑:
为了测试并确保连接是可能的,我创建了一个 ruby 脚本来将消息发布到交换并使用发送到队列的消息。这没有任何问题。
我仍在尝试让 Talend Route/Job 工作。
编辑 2:
我检查了 RabbitMQ broker 的设置。它是基本安装,通过 TLS 支持 AMQP 0.9.1。不支持 AMQP 1.0 或 MQTT。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)