Partitioned queues/topics
Without partitions, a queue or topic is handled by a single message broker and stored in a single messaging store, which can constrain performance. Using partitions, a queue or topic can be spread across multiple brokers and stores, thereby providing a higher throughput rate than a single message broker and store. These partitions contain all the features of a no partitioned queue or topic, such as transactions and sessions.
When messages arrive at the queue or topic, they are distributed in a round-robin fashion to all the fragments of a partitioned queue or topic if no partition key has been defined.
To control which fragment receives what message, the properties SessionId
, PartitionKey
, and MessageId
may be used as partition keys. All messages received using the same partition key will be processed by that specific fragment. If that fragment is temporarily unavailable, an error will be returned.
When a client reads a message from a partitioned queue or topic, the...