2

WebsphereMQ ブローカーから要求を読み取り、統合システムを介してそれらを渡し、応答メッセージで応答する jms-inbound-gateway があります。

jms_messageId ヘッダーと jms_correlationId ヘッダーを設定してメッセージをログに記録する必要があるため、ログ ファイル内の要求/応答メッセージを一致させることができます (そして、応答に正しい jms_correlationId がないと言われたらクライアントに表示します)。

correlationId ヘッダーが設定された後にメソッド producer.sendReply(...) をインターセプトする方法はありますか?

4

2 に答える 2

1

これは、ゲイリーの入力後の私のソリューションの要点です:

<jms:inbound-gateway 
    id="inboundDestination" 
    connection-factory="connectionFactory"  
    request-destination="nmRequestsQueue" 
    request-channel="request-begin" 
    reply-channel="request-end" 
    error-channel="normaErrorChannel" 
    concurrent-consumers="1" 
    acknowledge="transacted" />

<int:logging-channel-adapter id="request-response-logger"
        log-full-message="true"
        level="DEBUG" 
        logger-name="com.audaxys.si.messages" />

<int:channel id="request-begin">
    <int:interceptors>
        <int:wire-tap channel="request-response-logger" />
    </int:interceptors>
</int:channel>

<int:chain input-channel="request-begin" output-channel="request-end">
    ... Do Stuff ...
</int:chain>

<int:publish-subscribe-channel id="request-end">
    <int:interceptors>
        <int:wire-tap channel="request-response-logger" />
    </int:interceptors>
</int:publish-subscribe-channel>
于 2015-02-26T17:20:15.580 に答える