Rpc¶
The Rpc class for Rpc requests.
-
class
amqppy.publisher.Rpc(broker)[source]¶ The duty of Rpc class is to make RPC requests and returns its responses. RPC pattern tutorial. The class instance will create on single connection to the broker for all the RPC requests.
Parameters: broker (str) – The URL for connection to RabbitMQ. Eg: ‘amqp://serviceuser:password@rabbit.host:5672//’ -
request(exchange, routing_key, body, timeout=10.0)[source]¶ Makes a RPC request and returns its response. RPC pattern tutorial. This call creates and destroys a connection every time, if you want to save connections, please use the class Rpc.
Parameters:
-