我不知道我错过了什么,但我的死信频道没有启动。骆驼配置定义为
<bean id="myDeadLetterHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder">
<property name="deadLetterUri" value="activemq:queue:TESTQUEUE"/>
</bean>
<route errorHandlerRef="myDeadLetterHandler">
<from uri="seda:elixirBatchQueue" />
<convertBodyTo type="String"/>
<inOnly uri="activemq:queue:someQ"/>
</route>
这里someQ不存在,而 TESTQUEUE 确实存在。
日志是:
DEBUG SendProcessor:114 - >>>> Endpoint[activemq://queue:someQ] Exchange[Message: org.dom4j.tree.DefaultDocument@afdb52]
DEBUG FailoverTransport:660 - Reconnect was triggered but transport is not started yet. Wait for start to connect the transport.
DEBUG FailoverTransport:302 - Started.
DEBUG FailoverTransport:653 - Waking up reconnect task
DEBUG FailoverTransport:683 - urlList connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616]
DEBUG FailoverTransport:855 - Attempting connect to: tcp://localhost:61616