public interface KafkaListenerEndpoint
KafkaListenerConfigurer
to register endpoints programmatically.Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getAutoStartup()
Return the autoStartup for this endpoint's container.
|
java.lang.String |
getClientIdPrefix()
Return the client id prefix for the container; it will be suffixed by
'-n' to provide a unique id when concurrency is used.
|
java.lang.Integer |
getConcurrency()
Return the concurrency for this endpoint's container.
|
default java.util.Properties |
getConsumerProperties()
Get the consumer properties that will be merged with the consumer properties
provided by the consumer factory; properties here will supersede any with the same
name(s) in the consumer factory.
|
java.lang.String |
getGroup()
Return the group of this endpoint or null if not in a group.
|
java.lang.String |
getGroupId()
Return the groupId of this endpoint - if present, overrides the
group.id property of the consumer factory. |
java.lang.String |
getId()
Return the id of this endpoint.
|
default java.util.Collection<TopicPartitionInitialOffset> |
getTopicPartitions()
Deprecated.
in favor of
getTopicPartitionsToAssign() . |
TopicPartitionOffset[] |
getTopicPartitionsToAssign()
Return the topicPartitions for this endpoint.
|
java.util.regex.Pattern |
getTopicPattern()
Return the topicPattern for this endpoint.
|
java.util.Collection<java.lang.String> |
getTopics()
Return the topics for this endpoint.
|
boolean |
isSplitIterables()
When true,
Iterable return results will be split into discrete records. |
void |
setupListenerContainer(MessageListenerContainer listenerContainer,
MessageConverter messageConverter)
Setup the specified message listener container with the model
defined by this endpoint.
|
java.lang.String getId()
KafkaListenerContainerFactory.createListenerContainer(org.springframework.kafka.config.KafkaListenerEndpoint)
java.lang.String getGroupId()
group.id
property of the consumer factory.java.lang.String getGroup()
java.util.Collection<java.lang.String> getTopics()
@Deprecated default java.util.Collection<TopicPartitionInitialOffset> getTopicPartitions()
getTopicPartitionsToAssign()
.TopicPartitionOffset[] getTopicPartitionsToAssign()
java.util.regex.Pattern getTopicPattern()
java.lang.String getClientIdPrefix()
java.lang.Integer getConcurrency()
java.lang.Boolean getAutoStartup()
@Nullable default java.util.Properties getConsumerProperties()
group.id
and client.id
are ignored.ConsumerConfig
,
getGroupId()
,
getClientIdPrefix()
void setupListenerContainer(MessageListenerContainer listenerContainer, MessageConverter messageConverter)
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.
listenerContainer
- the listener container to configuremessageConverter
- the message converter - can be nullboolean isSplitIterables()
Iterable
return results will be split into discrete records.