Spring integration Spring集成jmsmessage驱动的通道适配器与IBM MQ

Spring integration Spring集成jmsmessage驱动的通道适配器与IBM MQ,spring-integration,jms-topic,Spring Integration,Jms Topic,我已经编写了使用SpringIntegrationJMS消息驱动通道适配器从IBMMQ读取消息的代码,但无法从队列中读取消息。下面是我的配置 <beans:bean id="ibmJmsConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <beans:property name="transportType" value="1"/> <beans:property n

我已经编写了使用SpringIntegrationJMS消息驱动通道适配器从IBMMQ读取消息的代码,但无法从队列中读取消息。下面是我的配置

<beans:bean id="ibmJmsConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
    <beans:property name="transportType" value="1"/>
    <beans:property name="queueManager" value="***"/>
    <beans:property name="hostName" value="**"/>
    <beans:property name="port" value="**" />
    <beans:property name="channel" value="***"/>
</beans:bean>


<beans:bean id="receiverQueue" class="com.ibm.mq.jms.MQQueue">
    <beans:constructor-arg index="0" value="****"/>
    <beans:constructor-arg index="1" value="****"/>
</beans:bean>
<integration:channel id="componentInfoChannel" />

 <jms:message-driven-channel-adapter
        id="componentInfoAdapter" connection-factory="ibmJmsConnectionFactory" destination="receiverQueue" channel="componentInfoChannel" 
         />

<integration:service-activator id="componentInfoActivator"
        input-channel="componentInfoChannel" ref="componentInfoConsumer"
        method="componentInfoListen" />

上面的配置正在工作,但当我在控制台上添加日志适配器时失败了。详细信息如下

<integration:logging-channel-adapter
        id="componentInfologger" level="INFO" />
    <integration:wire-tap id="componentInfoWireTap"
        channel="componentInfologger" pattern="*" order="2" />
    <integration:logging-channel-adapter
        id="logger" log-full-message="true" level="INFO" />

   2017-02-23 00:09:05.093  WARN [componentdatafiles,48f69e84ab395754,ebf4ae7f3b812a01,false] 90072 --- [ter.container-1] o.s.j.l.DefaultMessageListenerContainer  :  Execution of JMS message listener failed, and no ErrorHandler has been set.
java.lang.StackOverflowError: null
    at java.util.Collections$SynchronizedMap.put(Unknown Source)
    at ch.qos.logback.classic.util.LogbackMDCAdapter.put(LogbackMDCAdapter.java:110)
    at org.slf4j.MDC.put(MDC.java:147)
    at org.springframework.cloud.sleuth.log.Slf4jSpanLogger.logStartedSpan(Slf4jSpanLogger.java:48)
    at org.springframework.cloud.sleuth.trace.DefaultTracer.createChild(DefaultTracer.java:170)
    at org.springframework.cloud.sleuth.trace.DefaultTracer.createSpan(DefaultTracer.java:72)
    at org.springframework.cloud.sleuth.instrument.messaging.TraceChannelInterceptor.startSpan(TraceChannelInterceptor.java:98)
    at org.springframework.cloud.sleuth.instrument.messaging.TraceChannelInterceptor.preSend(TraceChannelInterceptor.java:78)
    at org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
    at org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
    at org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
    at org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
    at org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
    at org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
    at org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
    at org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)

2017-02-23 00:09:05.093警告[componentdatafiles,48f69e84ab395754,ebf4ae7f3b812a01,false]90072---[ter.container-1]o.s.j.l.DefaultMessageListenerContainer:执行JMS消息侦听器失败,未设置错误处理程序。
java.lang.StackOverflower错误:null
位于java.util.Collections$SynchronizedMap.put(未知源)
在ch.qos.logback.classic.util.LogbackMDCAdapter.put(LogbackMDCAdapter.java:110)中
位于org.slf4j.MDC.put(MDC.java:147)
位于org.springframework.cloud.sleuth.log.Slf4jSpanLogger.logStartedSpan(Slf4jSpanLogger.java:48)
位于org.springframework.cloud.sleuth.trace.DefaultTracer.createChild(DefaultTracer.java:170)
位于org.springframework.cloud.sleuth.trace.DefaultTracer.createSpan(DefaultTracer.java:72)
位于org.springframework.cloud.sleuth.instrument.messaging.TraceChannelInterceptor.startSpan(TraceChannelInterceptor.java:98)
位于org.springframework.cloud.sleuth.instrument.messaging.TraceChannelInterceptor.preSend(TraceChannelInterceptor.java:78)
位于org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
位于org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
位于org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
位于org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
位于org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
位于org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
位于org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
位于org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
位于org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)
位于org.springframework.integration.channel.AbstractMessageChannel$ChannelInterceptorList.preSend(AbstractMessageChannel.java:538)
位于org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:415)
位于org.springframework.integration.channel.interceptor.WireTap.preSend(WireTap.java:168)

抱歉耽搁了。因此,我猜您的
id=“logger”
是冗余组件。而问题恰恰在于
以及与
跟踪通道接收器的组合

我的意思是你在这里用弹簧云侦探

您是否介意为
org.springframework.integration
类别共享
DEBUG
,同时我正在尝试在本地重现一个问题

另外,您可以从跟踪中排除
componentInfologger
,以避免
java.lang.StackOverflowerError


我想我们可能会通过
导线点击

来循环跟踪,您介意详细说明吗?什么是症状?问题看起来怎么样?您的配置中没有任何内容。一些日志,堆栈跟踪,测试用例等,请。编辑我的问题,请查看itNo-op。需要简单的春季启动应用程序从你玩。我想它可能已经没有JMS了。看起来您的配置中有一个递归…感谢Artem解决了这个问题,这是由于重复的id logger和logger对象是在两个不同的类中使用相同的类名ComponentInfoConsumer.class从LoggerFactory创建的。结束问题