Message consumer.
Parameters: |
|
---|
:param queues see queues. :keyword no_ack: see no_ack. :keyword auto_declare: see auto_declare :keyword callbacks: see callbacks. :keyword on_decode_error: see on_decode_error.
The connection channel to use.
By default the entities will be declared at instantiation, if you want to handle this manually you can set this to False.
List of callbacks called in order when a message is received.
The signature of the callbacks must take two arguments: (body, message), which is the decoded message body and the Message instance (a subclass of Message).
Callback called when a message can’t be decoded.
The signature of the callback must take two arguments: (message, exc), which is the message that can’t be decoded and the exception that occured while trying to decode it.
End all active queue consumers.
This does not affect already delivered messages, but it does mean the server will not send any more messages for this consumer.
Register consumer on server.
Keyword : | delivery_tag: Unique delivery tag for this channel. If not specified a new tag will be automatically generated. |
---|
Declare queues, exchanges and bindings.
This is done automatically at instantiation if auto_declare is set.
Enable/disable flow from peer.
This is a simple flow-control mechanism that a peer can use to avoid overflowing its queues or otherwise finding itself receiving more messages than it can process.
The peer that receives a request to stop sending content will finish sending the current content (if any), and then wait until flow is reactivated.
Purge messages from all queues.
WARNING: This will delete all ready messages, there is no undo operation available.
Specify quality of service.
The client can request that messages should be sent in advance so that when the client finishes processing a message, the following message is already held locally, rather needing to be sent down the channel. Prefetching gives a performance improvement.
The prefetch window is Ignored if the no_ack option is set.
Parameters: |
|
---|
Method called when a message is received.
This dispatches to the registered callbacks.
Parameters: |
|
---|---|
Raises NotImplementedError: | |
If no consumer callbacks have been registered. |
Redeliver unacknowledged messages.
Asks the broker to redeliver all unacknowledged messages on the specified channel.
Parameters: |
|
---|
Message Producer.
Parameters: |
|
---|
The connection channel to use.
Exchange to publish to.
Default routing key.
Default serializer to use. Default is autodetect.
By default the exchange is declared at instantiation. If you want to declare manually you can set this to False.
Declare the exchange.
This is done automatically at instantiation if auto_declare is set.
Publish message to the specified exchange.
Parameters: |
|
---|