public interface ConsumerActions<K,V>
Modifier and Type | Interface and Description |
---|---|
static interface |
ConsumerActions.DynamicAssignment<K,V>
Implementation of actions that allow dynamic assignment of topic/partitions.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
isRunning() |
default void |
start() |
default void |
stop() |
<R> CompletableFuture<R> |
submit(Function<? super org.apache.kafka.clients.consumer.Consumer<K,V>,? extends R> consumerAction)
Submit an action to be performed in the consumer thread and return a
CompletableFuture
that will be completed with the action outcome when executed. |
<R> CompletableFuture<R> submit(Function<? super org.apache.kafka.clients.consumer.Consumer<K,V>,? extends R> consumerAction)
CompletableFuture
that will be completed with the action outcome when executed.R
- the return type of the actionconsumerAction
- the action to perform in the consumer thread, taking the Consumer
parameter
and returning some arbitrary resultCompletableFuture
completed with action result in consumer threadIllegalStateException
- if this method is invoked from the consumer threaddefault void start()
default boolean isRunning()
default void stop()
Copyright © 2019 Red Hat. All rights reserved.