Interface ListenerEndpoint<C extends MessageListenerContainer>

Type Parameters:
C - Message listener container type.
All Known Subinterfaces:
PulsarListenerEndpoint, ReactivePulsarListenerEndpoint<T>
All Known Implementing Classes:
AbstractPulsarListenerEndpoint, AbstractReactivePulsarListenerEndpoint, MethodPulsarListenerEndpoint, MethodReactivePulsarListenerEndpoint, PulsarListenerEndpointAdapter, ReactivePulsarListenerEndpointAdapter

public interface ListenerEndpoint<C extends MessageListenerContainer>
Model for a Pulsar listener endpoint. Can be used against a PulsarListenerConfigurer to register endpoints programmatically.
Author:
Christophe Bornet, Vedran Pavic
  • Method Summary

    Modifier and Type
    Method
    Description
    default Boolean
    Return the autoStartup for this endpoint's container.
    default Integer
    Return the concurrency for this endpoint's container.
    default String
    Return the id of this endpoint.
    default org.apache.pulsar.common.schema.SchemaType
    Return the schema type for this endpoint's container.
    default String
    Return the subscription name for this endpoint's container.
    default org.apache.pulsar.client.api.SubscriptionType
    Return the subscription type for this endpoint's container.
    default String
    Return the topic pattern for this endpoint's container.
    Return the topics for this endpoint's container.
    default void
    setupListenerContainer(C listenerContainer, MessageConverter messageConverter)
    Setup the specified message listener container with the model defined by this endpoint.
  • Method Details

    • getId

      @Nullable default String getId()
      Return the id of this endpoint.
      Returns:
      the id of this endpoint. The id can be further qualified when the endpoint is resolved against its actual listener container.
      See Also:
    • getSubscriptionName

      @Nullable default String getSubscriptionName()
      Return the subscription name for this endpoint's container.
      Returns:
      the subscription name.
    • getSubscriptionType

      @Nullable default org.apache.pulsar.client.api.SubscriptionType getSubscriptionType()
      Return the subscription type for this endpoint's container.
      Returns:
      the subscription type.
    • getTopics

      default Collection<String> getTopics()
      Return the topics for this endpoint's container.
      Returns:
      the topics.
    • getTopicPattern

      default String getTopicPattern()
      Return the topic pattern for this endpoint's container.
      Returns:
      the topic pattern.
    • getAutoStartup

      @Nullable default Boolean getAutoStartup()
      Return the autoStartup for this endpoint's container.
      Returns:
      the autoStartup.
    • getSchemaType

      default org.apache.pulsar.common.schema.SchemaType getSchemaType()
      Return the schema type for this endpoint's container.
      Returns:
      the schema type.
    • getConcurrency

      @Nullable default Integer getConcurrency()
      Return the concurrency for this endpoint's container.
      Returns:
      the concurrency.
    • setupListenerContainer

      default void setupListenerContainer(C listenerContainer, @Nullable MessageConverter messageConverter)
      Setup the specified message listener container with the model defined by this endpoint.

      This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the queues and the messageListener to use but an implementation may override any default setting that was already set.

      Parameters:
      listenerContainer - the listener container to configure
      messageConverter - the message converter - can be null