Annotation Interface PulsarSubscription


@Documented @Retention(RUNTIME) @Target(TYPE) @MessageListener public @interface PulsarSubscription
Mark a class that contains Pulsar consumers. Each method in class should be isolated consumer. However, Pulsar provides multiple consumers via single subscription if they are set to Failover, Share, or such.
Since:
1.0
Author:
Haris Secic
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    By default it will use PulsarConsumer builder default values.
    If not set, UUID will be generated as subscription name to avoid collisions if consumer type is Exclusive.
    org.apache.pulsar.client.api.SubscriptionType
    By default Exclusive.
  • Element Details

    • subscriptionName

      String subscriptionName
      If not set, UUID will be generated as subscription name to avoid collisions if consumer type is Exclusive.
      Returns:
      Subscription name
      See Also:
      • ConsumerBuilder.subscriptionType(org.apache.pulsar.client.api.SubscriptionType)
      Default:
      ""
    • subscriptionType

      org.apache.pulsar.client.api.SubscriptionType subscriptionType
      By default Exclusive.
      Returns:
      Type of consumer subscription
      See Also:
      • ConsumerBuilder.subscriptionType(org.apache.pulsar.client.api.SubscriptionType)
      Default:
      Exclusive
    • ackGroupTimeout

      String ackGroupTimeout
      By default it will use PulsarConsumer builder default values.
      Returns:
      Maximum amount of time allowed to pass for message to be acknowledged or else redelivery happens.
      See Also:
      • ConsumerBuilder.acknowledgmentGroupTime(long, java.util.concurrent.TimeUnit)
      Default:
      ""