感谢您的回复。这个表达式正在工作,但只要我添加有效载荷,我就会得到异常。 (我的消息来自mqtt是CSV格式)
<int:logging-channel-adapter id=logger" expression="'Header Id:' + headers.id + '; Date:' + headers.timestamp + '; PAYLOAD : Id:' + payload.id + '; Date:' + payload.createdAt + '; FromUser: ' + payload.fromUser + '; Content: ' + payload.text" level="INFO" />
我得到的问题,我的消息没有更多的记录。这特别适用于来自mqtt的消息。
<int-mqtt:message-driven-channel-adapter id="mqttBroker"
client-id="test"
url="tcp://address"
client-factory="clientFactory"
topics="hello/world"
auto-startup="true"
error-channel="errorChannel"
channel="messages" />
<int:channel id="messages" >
<int:queue />
<int:interceptors>
<int:wire-tap channel="logger" />
</int:interceptors>
</int:channel>
这里的例外
[Payload MessageHandlingException content=org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.integration.handler.LoggingHandler#0]][Headers={history=errorChannel,errorLogger,errorLogger.adapter, id=f31e122f-f1ed-b61f-7b9c-8b4f856b1898, timestamp=1397032153091}]
如何在这种情况下怎么办?
其他认为,我看不到队列的状态,这可能吗?
不要问在答案中的问题(我只是没有看到它在通知中)。这是为了我们 - 帮助你。您可以编辑自己的帖子以提供更多信息。不要忘了说实话,投票支持,并把它们标记为完整,如果你拿到了东西。 –