Interface ProducerDestination


public interface ProducerDestination
Represents a ProducerDestination that provides the information about the destination that is physically provisioned through ProvisioningProvider.provisionProducerDestination(String, ProducerProperties).
Since:
1.2
Author:
Soby Chacko
  • Method Summary

    Modifier and Type
    Method
    Description
    Provides the destination name.
    getNameForPartition(int partition)
    Provides the destination name for a given partition.
  • Method Details

    • getName

      String getName()
      Provides the destination name.
      Returns:
      destination name
    • 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