A partition is an independently ordered channel within a sharded message stream. It lets multiple receivers process separate partitions concurrently while preserving order within each partition. section 8.3.3 section 8.3.6
The sender includes a shard key in each message. The broker uses that key to select a partition, then assigns each partition to one receiver in a group. Assignments can change as receivers start or stop. Global ordering can limit throughput and scalability. section 8.3.6 section 8.3.3
Ordering order events
Use orderId as the shard key for Order Created, Order Updated, and Order Cancelled events. Events for each order reach the same partition and are processed in order by one receiver. section 8.3.6
Figure 8.15 Scaling consumers while preserving message ordering by using a sharded (partitioned) message channel. The sender includes the shard key in the message. The message broker writes the message to a shard determined by the shard key. The message broker assigns each partition to an instance of the replicated receiver.
Trace how the shard key determines a partition and how the broker assigns partitions to receiver instances. section 8.3.6



