send(self,
object,
sync=True,
timeout=None)
| source code
|
Send a message. If the object passed in is of type unicode , str , list , or dict , it will
automatically be wrapped in a Message
and sent. If it is of type Message, it will be sent directly. If the sender
capacity is not UNLIMITED then send will block until there is available
capacity to send the message. If the timeout parameter is specified, then
send will throw an InsufficientCapacity exception if capacity does not
become available within the specified time.
- Parameters:
object (unicode, str, list, dict, Message) - the message or content to send
sync (boolean) - if true then block until the message is sent
timeout (float) - the time to wait for available capacity
- Decorators:
|