Spring 入站通道适配器抛出“;“没有可用的输出通道或replyChannel标头”;错误

Spring 入站通道适配器抛出“;“没有可用的输出通道或replyChannel标头”;错误,spring,spring-integration,spring-jms,spring-integration-amqp,Spring,Spring Integration,Spring Jms,Spring Integration Amqp,我希望从JMS获取消息,并将其作为HTTP请求发送,如果失败,请将其再次排入JMS队列 我尝试过使用入站消息适配器和消息驱动的通道适配器,但由于出现“ChannelResolutionException:无输出通道或replyChannel标头可用”异常而失败,但由于我不想回复入站消息适配器,不确定为什么要包含replyChannel标头 <jms:outbound-channel-adapter id="outboundJMSAdaptor" jms-template="jms

我希望从JMS获取消息,并将其作为HTTP请求发送,如果失败,请将其再次排入JMS队列

我尝试过使用入站消息适配器和消息驱动的通道适配器,但由于出现“ChannelResolutionException:无输出通道或replyChannel标头可用”异常而失败,但由于我不想回复入站消息适配器,不确定为什么要包含replyChannel标头


    <jms:outbound-channel-adapter id="outboundJMSAdaptor" jms-template="jmsTemplate"
            channel="jmsOutChannel"
            destination="requestQueue"/>
    <int:channel id="jmsInChannel" />

    <jms:message-driven-channel-adapter
            channel="jmsInChannel" destination="requestQueue"
            connection-factory="jmsConnectionFactory" message-converter="jmsMessageConverter"/>

    <int:header-enricher input-channel="jmsInChannel" output-channel="header_enriched_request">
        <int:header name="addressId" expression="payload.getId()"/>
        <int:header name="Accept-Language" value="en_GB"/>
        <int:header name="X-Source-CountryCode" value="GB"/>
        <int:header name="X-Source-Operator" value="Enterprise"/>
        <int:header name="X-Source-Division" value="CustomerManagement"/>
        <int:header name="X-Source-System" value="${sapwebservices.http.header.source.system}"/>
        <int:header name="X-Source-Timestamp" expression="new java.text.SimpleDateFormat('yyyy-MM-dd HH:mm:ss').format(new java.util.Date())"/>
        <int:header name="Accept" value="application/json"/>
        <int:header name="Content-Type" value="application/json;charset=UTF-8"/>
    </int:header-enricher>

    <int:object-to-json-transformer input-channel="header_enriched_request"
            output-channel="update_customer_shipping_address_outbound_gateway"
            object-mapper="nonNullObjectMapper"/>

    <http:outbound-gateway mapped-request-headers="Accept*, Content-Type, X-*, HTTP_REQUEST_HEADERS"
            request-channel="update_customer_shipping_address_outbound_gateway"
            reply-channel="print_payload_update_shipping"
            url="${sapwebservices.ws.uri.updatecustomershippingaddress}"
            http-method="PUT"
            expected-response-type="java.lang.String"
            charset="UTF-8"
            request-factory="updateCustomerAccountRequestFactory">
        <http:uri-variable name="id" expression="headers['addressId']"/>
    </http:outbound-gateway>
    <int:service-activator input-channel="print_payload_update_shipping" output-channel="clean_no_print_char_update_customershippingaddress" ref="sapPrintPayload"/>
    <int:transformer input-channel="clean_no_print_char_update_customershippingaddress" output-channel="resp_mapping_json_to_jsonobj_updatecustomershippingaddress">
        <bean class="util.CleanNoPrintCharTransformer"/>
    </int:transformer>
    <int:json-to-object-transformer input-channel="resp_mapping_json_to_jsonobj_updatecustomershippingaddress"
                                    output-channel="clean_no_print_char_update_customershippingaddress"
                                    type="customer_shipping_address_response.json.CustomerShippingAddressResponse"/>
    <int:transformer input-channel="clean_no_print_char_update_customershippingaddress" output-channel="">
        <bean class="transformer.CreateCustomerShippingAddressPostTransformer"/>
    </int:transformer>

此外,如果http:outbound gateway响应为null或第三方服务关闭,则希望将消息再次排入jms队列。

谢谢。您知道在响应为空或第三方服务器关闭的情况下,如何将相同的原始请求消息重新排队吗?您不应该在评论中提出补充问题;它不能帮助人们找到问题/答案。使用消息驱动适配器时,如果引发异常,它将自动重新排队,只要您仅使用可订阅通道(默认),以便流在容器线程上运行。
<int:transformer input-channel="clean_no_print_char_update_customershippingaddress" 
        output-channel="">
<int:transformer input-channel="clean_no_print_char_update_customershippingaddress" 
        output-channel="">
<int:transformer input-channel="clean_no_print_char_update_customershippingaddress" 
        output-channel="nullChannel">