Interface ListenerEndpoint<C extends MessageListenerContainer>
- Type Parameters:
C- Message listener container type.
- All Known Subinterfaces:
PulsarListenerEndpoint
- All Known Implementing Classes:
AbstractPulsarListenerEndpoint,MethodPulsarListenerEndpoint
public interface ListenerEndpoint<C extends MessageListenerContainer>
Model for a Pulsar listener endpoint. Can be used against a
PulsarListenerConfigurer to register
endpoints programmatically.-
Method Summary
Modifier and TypeMethodDescriptiondefault BooleanReturn the autoStartup for this endpoint's container.default IntegerReturn the concurrency for this endpoint's container.default StringgetId()Return the id of this endpoint.default org.apache.pulsar.common.schema.SchemaTypeReturn the schema type for this endpoint's container.default StringReturn the subscription name for this endpoint's container.default org.apache.pulsar.client.api.SubscriptionTypeReturn the subscription type for this endpoint's container.default StringReturn the topic pattern for this endpoint's container.default Collection<String>Return the topics for this endpoint's container.default voidsetupListenerContainer(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
@Nullable default org.apache.pulsar.client.api.SubscriptionType 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
queuesand themessageListenerto 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
-