[openstack-dev] [oslo.messaging] Can RPCClient.call() be used with a subset of servers?

Russell Bryant rbryant at redhat.com
Mon Feb 9 21:58:17 UTC 2015


On 02/09/2015 04:04 PM, Doug Hellmann wrote:
> 
> 
> On Mon, Feb 9, 2015, at 02:40 PM, Gravel, Julie Chongcharoen wrote:
>> Hello,
>>                 I want to use oslo.messaging.RPCClient.call() to invoke a
>>                 method on multiple servers, but not all of them. Can this
>>                 be done and how? I read the code documentation (client.py
>>                 and target.py). I only saw either the call used for one
>>                 server at a time, or for all of them using the fanout
>>                 param. Neither options is exactly what I want.
>> Any response/explanation would be highly appreciated.
> 
> This isn't a pattern that has come up before. Before we talk about
> adding it, I'd like to understand more about your use case. How do you
> know which servers should receive the call, for example? And are you
> actually calling and expecting a response, or do you just need to send a
> message to those servers?

If no response is needed, you might be able to use whatever is done for
notifications.  Notifications are sent out to a topic, and N servers may
be subscribed to receive those notifications.  IIRC, that isn't done
through the RPC classes, but would result in the pattern desired here.

-- 
Russell Bryant



More information about the OpenStack-dev mailing list