Menu Search

A Consumer is created when an AMQP connection wishes to receive messages from a message source (such as a Queue). The standard behaviours of consumers are defined by the respective AMQP specification, however in addition to the standard behaviours a number of Qpid specific enhancements are available

By default, when there are multiple competing consumers attached to the same message source, the Broker attempts to distribute messages from the queue in a "fair" manner. Some use cases require allocation of messages to consumers to be based on the "priority" of the consumer. Where there are multiple consumers having differing priorities, the Broker will always attempt to deliver a message to a higher priority consumer before attempting delivery to a lower priority consumer. That is, a lower priority consumer will only receive a message if no higher priority consumers currently have credit available to consume the message, or those consumers have declined to accept the message (for instance because it does not meet the criteria of any selectors associated with the consumer).

Where a consumer is created with no explicit priority provided, the consumer is given the highest possible priority.