@PublicEvolving @FunctionalInterface public interface StopCursor extends Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
StopCursor.StopCondition
The conditional for control the stop behavior of the pulsar source.
|
Modifier and Type | Method and Description |
---|---|
static StopCursor |
afterEventTime(long timestamp)
Stop consuming when message eventTime is greater than the specified timestamp.
|
static StopCursor |
afterMessageId(org.apache.pulsar.client.api.MessageId messageId)
Stop consuming when the messageId is greater than the specified messageId.
|
static StopCursor |
afterPublishTime(long timestamp)
Stop consuming when message publishTime is greater than the specified timestamp.
|
static StopCursor |
atEventTime(long timestamp)
Stop consuming when message eventTime is greater than or equals the specified timestamp.
|
static StopCursor |
atMessageId(org.apache.pulsar.client.api.MessageId messageId)
Stop consuming when the messageId is equal or greater than the specified messageId.
|
static StopCursor |
atPublishTime(long timestamp)
Stop consuming when message publishTime is greater than or equals the specified timestamp.
|
static StopCursor |
defaultStopCursor() |
static StopCursor |
latest() |
static StopCursor |
never() |
default void |
open(org.apache.pulsar.client.admin.PulsarAdmin admin,
TopicPartition partition)
The open method for the cursor initializer.
|
StopCursor.StopCondition |
shouldStop(org.apache.pulsar.client.api.Message<?> message)
Determine whether to pause consumption on the current message by the returned enum.
|
default void open(org.apache.pulsar.client.admin.PulsarAdmin admin, TopicPartition partition)
StopCursor.StopCondition shouldStop(org.apache.pulsar.client.api.Message<?> message)
static StopCursor defaultStopCursor()
static StopCursor never()
static StopCursor latest()
static StopCursor atMessageId(org.apache.pulsar.client.api.MessageId messageId)
static StopCursor afterMessageId(org.apache.pulsar.client.api.MessageId messageId)
static StopCursor atEventTime(long timestamp)
static StopCursor afterEventTime(long timestamp)
static StopCursor atPublishTime(long timestamp)
static StopCursor afterPublishTime(long timestamp)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.