Carrot compatible interface for Publisher and Producer.
See http://packages.python.org/pypi/carrot for documentation.
copyright: |
|
---|---|
license: | BSD, see LICENSE for more details. |
Replace with kombu.messaging.Producer.
Declare the exchange.
This happens automatically at instantiation if auto_declare is enabled.
Declare the exchange if it hasn’t already been declared during this session.
Publish message to the specified exchange.
Parameters: |
|
---|
Revive the producer after connection loss.
Replace with kombu.messaging.Consumer.
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.
Cancel consumer by queue name.
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.
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 than 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: | requeue – By default the messages will be redelivered to the original recipient. With requeue set to true, the server will attempt to requeue the message, potentially then delivering it to an alternative subscriber. |
---|
Register a new callback to be called when a message is received.
The signature of the callback needs to accept two arguments: (body, message), which is the decoded message body and the Message instance (a subclass of Message.
Replace with kombu.messaging.Consumer.
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.
Cancel consumer by queue name.
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.
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 than 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: | requeue – By default the messages will be redelivered to the original recipient. With requeue set to true, the server will attempt to requeue the message, potentially then delivering it to an alternative subscriber. |
---|
Register a new callback to be called when a message is received.
The signature of the callback needs to accept two arguments: (body, message), which is the decoded message body and the Message instance (a subclass of Message.