最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mule - AMQP queue headers disappearing after the message is published - Stack Overflow

programmeradmin0浏览0评论

in a circuit breaker context, we are trying to publish rabbit messages in a "headers" exchange. We're using the AMQP publish connector (version 1.7.4) in mule 4.4.0, and we're trying to publish our message with headers. The message ends up being published but the headers disappear for some reason that we don't know

The subflow containing the publish connector :

<sub-flow name="publish-retry">
        <amqp:publish doc:name="mom_provider_config" 
            exchangeName="${secure::exchange.delay}" requestBrokerConfirms="true" config-ref="domain-amqp-provider-config">
            
            <amqp:fallback-exchange-definition removalStrategy="SHUTDOWN" type="HEADERS"/>
            
            <amqp:routing-keys>
                <amqp:routing-key value="#[vars.originalPayload.routing_key]" />
            </amqp:routing-keys>
            <amqp:message>
                <amqp:properties correlationId="#[vars.notificationId]"  messageId="#[(vars.retryCounter as Number) + 1]"/>
                <amqp:headers ><![CDATA[#[{
    "nb_retry": (vars.retryCounter as Number) + 1,
    "routing_key": (vars.originalPayload.routing_key splitBy  ".")[0] ++ "." ++ (vars.originalPayload.routing_key splitBy  ".")[1]
}]]]></amqp:headers>
            </amqp:message>
        </amqp:publish> 
    </sub-flow>

    <sub-flow name="publish">
        <amqp:publish doc:name="mom_provider_config" 
            exchangeName="${secure::exchange.event}" requestBrokerConfirms="true" config-ref="domain-amqp-provider-config">
            
            <amqp:fallback-exchange-definition removalStrategy="SHUTDOWN" type="TOPIC"/>
            
            <amqp:routing-keys>
                <amqp:routing-key value="#[payload.routing_key]" />
            </amqp:routing-keys>
            <amqp:message>
                <amqp:properties correlationId="#[vars.notificationId]" />
            </amqp:message>
        </amqp:publish> 
    </sub-flow>

any idea on what might cause this ?

发布评论

评论列表(0)

  1. 暂无评论