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 TypeMethodDescriptiondefault Boolean
Return the autoStartup for this endpoint's container.default Integer
Return the concurrency for this endpoint's container.default String
getId()
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.default Collection<String>
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
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
Return the subscription name for this endpoint's container.- Returns:
- the subscription name.
-
getSubscriptionType
Return the subscription type for this endpoint's container.- Returns:
- the subscription type.
-
getTopics
Return the topics for this endpoint's container.- Returns:
- the topics.
-
getTopicPattern
Return the topic pattern for this endpoint's container.- Returns:
- the topic pattern.
-
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
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 themessageListener
to use but an implementation may override any default setting that was already set.- Parameters:
listenerContainer
- the listener container to configuremessageConverter
- the message converter - can be null
-