getNameForPartition
String getNameForPartition(int partition)
Provides the destination name for a given partition.
If the producer provision the destination with partitions, on certain middleware
brokers there may exist multiple destinations distinguishable by the partition. For
example, if the destination name is xyz and it is provisioned with 4
partitions, there may be 4 different destinations on the broker such as - xyz-0,
xyz-1, xyz-2 and xyz-3. This behavior is dependent on the broker and the way
the corresponding binder implements the logic.
On certain brokers (for instance, Kafka), this behavior is completely skipped and
there is a one-to-one correspondence between the destination name in the
provisioner and the physical destination on the broker.
- Parameters:
partition
- the partition to find destination for
- Returns:
- destination name for the given partition