Partitioner base class.
Custom partitioners are expected to extends this class and implement the calculatePartition method.
Metadata object.
Calculate the partition for the given message by rotating the message subject in a round-robin fashion.
Partition to send the message to.
Computes the partition number for a given message in a round-robin fashion by atomically incrementing a counter for the message subject and modding by the number of partitions for the first stream found with the subject. This does not work with streams containing wildcards in their subjects, e.g. "foo.*", since this matches on the subject literal of the published message. This also has undefined behavior if there are multiple streams for the given subject.