Virtual transport implementation.
Emulates the AMQ API for non-AMQ transports.
copyright: |
|
---|---|
license: | BSD, see LICENSE for more details. |
Virtual transport.
Parameters: | client – BrokerConnection instance |
---|
Time to sleep between unsuccessful polls.
port number used when no port is specified.
BrokerState containing declared exchanges and bindings (set by constructor).
This is an abstract class defining the channel methods you’d usually want to implement in a virtual channel.
Do not subclass directly, but rather inherit from Channel instead.
Virtual channel.
Parameters: | connection – The transport instance this channel is part of. |
---|
message class used.
Broker state containing exchanges and bindings.
flag to restore unacked messages when channel goes out of scope.
mapping of exchange types and corresponding classes.
Declare exchange.
Delete exchange and all its bindings.
Declare queue.
Delete queue.
Bind queue to exchange with routing key.
Remove all ready messages from queue.
Publish message.
Consume from queue
Cancel consumer by consumer tag.
Get message by direct access (synchronous).
Acknowledge message.
Recover unacked messages.
Reject message.
Change QoS settings for this channel.
Only prefetch_count is supported.
Get table of bindings for exchange.
Get the exchange type instance for exchange.
Prepare message data.
Enable/disable message flow.
Raises NotImplementedError: | |
---|---|
as flow is not implemented by the base virtual implementation. |
Close channel, cancel all consumers, and requeue unacked messages.
Acknowledge this message as being processed., This will remove the message from the queue.
Raises MessageStateError: | |
---|---|
If the message has already been acknowledged/requeued/rejected. |
Set to true if the message has been acknowledged.
Deserialize the message body, returning the original python structure sent by the publisher.
The decoded message body.
Reject this message.
The message will be discarded by the server.
Raises MessageStateError: | |
---|---|
If the message has already been acknowledged/requeued/rejected. |
Reject this message and put it back on the queue.
You must not use this method as a means of selecting messages to process.
Raises MessageStateError: | |
---|---|
If the message has already been acknowledged/requeued/rejected. |
Quality of Service guarantees.
Only supports prefetch_count at this point.
Parameters: |
|
---|
Acknowledge message and remove from transactional state.
Append message to transactional state.
Returns true if the channel can be consumed from.
Used to ensure the client adhers to currently active prefetch limits.
current prefetch count value
Remove from transactional state and requeue message.
If disabled, unacked messages won’t be restored at shutdown.
Restore all unacknowledged messages.
Restores all unacknowledged message at shutdown/gc collect.
Will only be done once for each instance.