@PublicEvolving public interface MessageDelayer<IN> extends Serializable
SubscriptionType.Shared
subscription.
Read delayed message delivery for better understanding this feature.
Modifier and Type | Method and Description |
---|---|
long |
deliverAt(IN message,
PulsarSinkContext sinkContext)
Return the send time for this message.
|
static <IN> FixedMessageDelayer<IN> |
fixed(java.time.Duration duration)
All the messages should be consumed in a fixed duration.
|
static <IN> FixedMessageDelayer<IN> |
never()
All the messages should be consumed immediately.
|
default void |
open(SinkConfiguration sinkConfiguration)
Implement this method if you have some non-serializable field.
|
long deliverAt(IN message, PulsarSinkContext sinkContext)
PulsarSinkContext.processTime()
and the non-positive value indicate this message should be
sent immediately.default void open(SinkConfiguration sinkConfiguration)
static <IN> FixedMessageDelayer<IN> never()
static <IN> FixedMessageDelayer<IN> fixed(java.time.Duration duration)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.