RPC調用和強制轉換是OpenStack中兩種不同類型的消息傳遞協議。在RPC.call的情況下,調用者(或調用者)等待工人(被調用者)的回覆或確認消息。如何捕獲回覆rabbitmq消息對應於OpenStack中的RPC.call請求消息?
我試圖攔截所有在OpenStack中通過rabbitmq系統的RPC消息(Request & Reply Message)。在OpenStack中,所有請求消息都通過名爲「nova」的單個交換。將一個新隊列附加到「nova」交換中,我可以捕獲請求消息。
現在,我想捕獲回覆給被調用者的回覆消息。回覆消息可以通過「直接消費」如下
a Direct Consumer comes to life if (an only if) a rpc.call operation is executed; this object is
instantiated and used to receive a response message from the queuing system; Every consumer connects to
a unique direct-based exchange via a unique exclusive queue; its life-cycle is limited to the message
delivery; the exchange and queue identifiers are determined by a *UUID generator*, and are marshaled in
the message sent by the Topic Publisher (only rpc.call operations).
爲了捕獲回覆消息被捕捉爲通過AMQP and Nova指定和摘錄,我試圖連接到與相應的MSG_ID或REQUEST_ID直接交換。我不確定什麼是正確的交換ID以捕獲特定rpc.call的回覆。
任何想法什麼是交換ID什麼我可以用來捕獲回覆rpc.call消息?附錄I中指定的UUID生成器是什麼?