Package gofer :: Package messaging :: Module producer :: Class Producer
[hide private]
[frames] | no frames]

Class Producer

source code

endpoint.Endpoint --+
                    |
                   Producer

An AMQP (abstract) message producer.

Instance Methods [hide private]
str
send(self, destination, ttl=None, **body)
Send a message.
source code
list
broadcast(self, destinations, **body)
Broadcast a message to (N) queues.
source code

Inherited from endpoint.Endpoint: __del__, __init__, __str__, ack, close, id, open, session

Inherited from endpoint.Endpoint (private): _lock, _unlock

Class Variables [hide private]

Inherited from endpoint.Endpoint: LOCALHOST, ssnpool

Instance Variables [hide private]

Inherited from endpoint.Endpoint: url, uuid

Method Details [hide private]

send(self, destination, ttl=None, **body)

source code 

Send a message.

Parameters:
  • destination (Destination) - An AMQP destination.
  • ttl (float) - Time to Live (seconds)
  • body - envelope body.
Returns: str
The message serial number.

broadcast(self, destinations, **body)

source code 

Broadcast a message to (N) queues.

Parameters:
  • destinations ([Destination,..]) - A list of AMQP destinations.
  • body - envelope body.
Returns: list
A list of (addr,sn).