Interface ShareConsumerFactory<K,V>
- Type Parameters:
K- the key type.V- the value type.
- All Known Implementing Classes:
DefaultShareConsumerFactory
public interface ShareConsumerFactory<K,V>
The strategy to produce a
ShareConsumer instance for Kafka queue support.- Since:
- 4.0
- Author:
- Soby Chacko
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener for share consumer lifecycle events. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddListener(int index, ShareConsumerFactory.Listener<K, V> listener) Add a listener at a specific index.default voidaddListener(ShareConsumerFactory.Listener<K, V> listener) Add a listener.createShareConsumer(@Nullable String groupId, @Nullable String clientId) Create a share consumer with the provided group id and client id.Return an unmodifiable reference to the configuration map for this factory.default @Nullable org.apache.kafka.common.serialization.Deserializer<K> Return the configured key deserializer (if provided as an object instead of a class name in the properties).default List<ShareConsumerFactory.Listener<K, V>> Get the current list of listeners.default @Nullable org.apache.kafka.common.serialization.Deserializer<V> Return the configured value deserializer (if provided as an object instead of a class name in the properties).default booleanremoveListener(ShareConsumerFactory.Listener<K, V> listener) Remove a listener.
-
Method Details
-
getConfigurationProperties
-
getKeyDeserializer
Return the configured key deserializer (if provided as an object instead of a class name in the properties).- Returns:
- the deserializer.
-
getValueDeserializer
Return the configured value deserializer (if provided as an object instead of a class name in the properties).- Returns:
- the deserializer.
-
getListeners
Get the current list of listeners.- Returns:
- the listeners.