AMPQ: - '历史'。期望[类MessageHistory]但实际类型是[class ArrayList]

时间:2015-05-21 19:36:49

标签: spring-integration spring-amqp

Spring Integration和Spring Integration AMQP。

我有以下代码:

<bean id="allHeadersMapper" class="org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper">
        <property name="requestHeaderNames" value="*" />
        <property name="replyHeaderNames" value="*" />
    </bean>

<int-amqp:inbound-channel-adapter channel="ResponseChannel" queue-names="OutputQueue" connection-factory="amqpConnectionFactory" error-channel="274ErrorChannel" header-mapper="allHeadersMapper"  />

我正在将EDI消息转换为JSON并放置在&#34; OutputQueue&#34; 。当我尝试从OutputQueue和Place in Channel中读取消息时,我尝试映射所有标准和非标准标题。

例如

[payload={abcPayload}, headers={amqp_consumerQueue=OutputQueue, amqp_receivedExchange=XExchange, VERSION_ID=1.0, amqp_contentEncoding=UTF-8, contentType=text/plain, amqp_redelivered=true, STATUS=ABC, timestamp=1432235031343, id=793599d5-6236-c6a1-717e-4f85f9cd9f7b, history=JSONChannel,ResponseLogging,FilterChannel1, amqp_receivedRoutingKey=OutputQueueKey, MESSAGE_ID=MESSAGE_ID, amqp_deliveryMode=NON_PERSISTENT, RECORD_ID=RECORD_ID, amqp_consumerTag=amq.ctag-7jyApLDNT5s_HbxOU8gkPQ, FLOW_NAME=BCD, amqp_deliveryTag=1}]

我得到了例外:

Incorrect type specified for header 'history'. Expected [class org.springframework.integration.history.MessageHistory] but actual type is [class java.util.ArrayList]

0 个答案:

没有答案