我在骆驼路线中使用了mime-multipart:marshal数据格式化程序。蓝图xml如下所示
<camel:streamCaching id="streamID123" spoolThreshold="5242880" spoolUsedHeapMemoryThreshold="50"/>
<camel:interceptFrom uri="jms:myEndpoint?*">
<camel:when>
<camel:simple>${property.CamelExternalRedelivered} == 'true'</camel:simple>
</camel:when>
<camel:to uri="my-retry://retry?retryInterval=60000&exponentialBackoff=false"/>
<camel:to uri="jms:E.myEndpoint?connectionFactory=#connectionFactory&transacted=true&transactionManager=#jmsTransactionManager&chunkQueue=C.myEndpoint&maxChunkSize=5242880&timeToLive=7776000000&preserveMessageQos=true"/>
<camel:stop/>
</camel:interceptFrom>
<camel:route>
<camel:from id="MessageFlow_11_1529400967051" uri="my-consumer:key"/>
<camel:to uri="dataformat:mime-multipart:marshal?multipartWithoutAttachment=true&multipartSubType=mixed&headersInline=true"/>
<camel:to uri="jms:myEndpoint?connectionFactory=#connectionFactory&transacted=true&transactionManager=#jmsTransactionManager&maxChunkSize=5242880&chunkQueue=C.myEndpoint"/>
</camel:route>
<camel:route id="Process_1">
<camel:from id="MessageFlow_11_1529400967059" uri="jms:myEndpoint?connectionFactory=#connectionFactory&transacted=true&transactionManager=#jmsTransactionManager&chunking=true&chunkReceiveTimeout=10000&cacheLevelName=CACHE_CONNECTION&concurrentConsumers=1&maxConcurrentConsumers=1&maxMessagesPerTask=10&defaultTaskExecutorType=ThreadPool&receiveTimeout=5000&exposeChunkingSession=false"/>
<camel:to uri="dataformat:mime-multipart:unmarshal?headersInline=true"/>
.
.
</camel:route>
</camel:camelContext>
我正在整理有效载荷并将其放入JMS。
问题: 在某些用途(定期发送消息)上,marshall组件的输出不完整。像下面这样。 (注意:这不容易重现)。我检查了my-consumer组件是否将正确的消息发送到了编组器,但是编组器的输出不完整。
消息ID:<1125672 @ 279378223> MIME版本:1.0 内容类型:多部分/混合; boundary =“ ---- = _ Part_319_387948114.1529377522701”