Class ConsumerIdentifier

java.lang.Object
com.azure.spring.messaging.ConsumerIdentifier

public class ConsumerIdentifier extends Object
The class to describe the consumer identifier according to the consumer destination and group.
  • Constructor Details

    • ConsumerIdentifier

      public ConsumerIdentifier(String destination)
      Construct an instance via the consumer destination, which is used for Service Bus Queue.
      Parameters:
      destination - the consumer destination, should be a Service Bus Queue name.
    • ConsumerIdentifier

      public ConsumerIdentifier(String destination, String group)
      Construct an instance via the consumer destination and group, which is used for Event Hubs and Service Bus Topic.
      Parameters:
      destination - the consumer destination.
      group - the group.
  • Method Details

    • getDestination

      public String getDestination()
      Get the destination.
      Returns:
      the destination.
    • getGroup

      public String getGroup()
      Get the group.
      Returns:
      the group.
    • hasGroup

      public boolean hasGroup()
      Return whether the consumer is in a group or not.
      Returns:
      true if the consumer is in a group.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object