2013-12-19 47 views
0

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生成器是什么?

回答