简体   繁体   English

春季整合 <inbound-channel-adapter> Rabbit MQ断开连接

[英]Spring Integration <inbound-channel-adapter> Rabbit MQ getting disconnected

We are working on a POC to use Spring integration and Rabbit MQ. 我们正在研究使用Spring集成和Rabbit MQ的POC。 We have two modules producer module and consumer module both are runs in different JVMs. 我们有两个模块生产者模块和使用者模块,它们都在不同的JVM中运行。 The Producer module listen on a Folder (input folder) as soon as new files arrives, creates a message then push to (incoming.q.in) queue and also move to process folder. 一旦新文件到达,生产者模块就会侦听文件夹(输入文件夹),创建一条消息,然后推送到(incoming.q.in)队列,然后移至处理文件夹。

The Consumer module then pickups the messages from the incoming.q.in Queue then process the files them move to complete folder. 消费者模块然后从入站队列中的入站消息中提取消息,然后处理它们移至完整文件夹的文件。

Both Producer and Consumer code is working fine but after some ideal item then consumer module is getting disconnecting from Rabbit MQ. 生产者代码和使用者代码都可以正常工作,但是经过一些理想的操作之后,使用者模块将与Rabbit MQ断开连接。 We see messages in incoming.q.in queue but the consumer is not processing. 我们在incoming.q.in队列中看到消息,但使用者没有处理。

When I logged into Rabbit MQ Admin/Management tool “incoming.q.in” consumer list is empty and the message is “... no consumers ...”. 当我登录Rabbit MQ管理员/管理工具“ incoming.q.in”时,消费者列表为空,消息为“ ...没有消费者...”。
The consumer code 消费者代码

<int-amqp:inbound-channel-adapter channel="inBoundfile" queue-names="incoming.q.in" connection-factory="connectionFactory"
    error-channel="error.in">
</int-amqp:inbound-channel-adapter>
<int:header-enricher input-channel="inBoundfile" output-channel="serviceInbound">
    <int:header name="FILEID" expression="payload.fileID" />
</int:header-enricher>
<int:service-activator ref="routerService" method="processFile" input-channel="serviceInbound" output-channel="fileHandler.router.in" />
....

I appreciate your help. 我感谢您的帮助。

Turn on DEBUG logging on the consumer side; 在使用者端开启DEBUG记录; you'll see lots of logging and reconnection attempts if/when a connection is lost. 如果/当连接断开时,您会看到很多记录和重新连接尝试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用相同通道的弹簧集成的多个入站通道适配器 - multiple inbound-channel-adapter of spring integration using the same channel 在构造后触发Spring Integration inbound-channel-adapter? - Spring integration inbound-channel-adapter triggered at post construct? Spring Integration轮询多台服务器上的入站通道适配器 - Spring Integration polling inbound-channel-adapter on multiple servers Spring Integration-file:inbound-channel-adapter-删除原始文件 - Spring Integration - file:inbound-channel-adapter - remove original file jdbc inbound-channel-adapter更新查询上的Spring Integration NotSerializableException - Spring Integration NotSerializableException on jdbc inbound-channel-adapter update query Spring JPA:入站通道适配器配置 - Spring jpa:inbound-channel-adapter configuration 在应用程序启动后添加spring-integration inbound-channel-adapter - Add spring-integration inbound-channel-adapter after the application has started 接收:MessageDeliveryException:分派器没有订阅者在2个不同的spring集成模块中使用入站通道适配器 - Receiving: MessageDeliveryException: Dispatcher has no subscribers using inbound-channel-adapter in 2 different spring integration modules Spring集成:使用RowMapper时入站通道适配器更新查询参数异常 - Spring Integration: Inbound-channel-adapter update query parameter exception when using RowMapper 春季整合sftp:inbound-channel-adapter delete-remote-files = false - spring integration sftp:inbound-channel-adapter delete-remote-files=false
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM