public interface Suppressed<K>
Nested Class Summary
Nested Classes Modifier and Type Interface Description
static interfaceMarker interface for a buffer configuration that will strictly enforce size constraints (bytes and/or number of records) on the buffer, so it is suitable for reducing duplicate results downstream, but does not promise to eliminate them entirely.
static interfaceMarker interface for a buffer configuration that is "strict" in the sense that it will strictly enforce the time bound and never emit early.
Modifier and Type Method Description
static <K> Suppressed<K>
Duration timeToWaitForMoreEvents, Suppressed.BufferConfig bufferConfig)(Configure the suppression to wait
timeToWaitForMoreEventsamount of time after receiving a record before emitting it further downstream.
Suppressed.StrictBufferConfig bufferConfig)(Configure the suppression to emit only the "final results" from the window.
String name)(Use the specified name for the suppression node in the topology.
untilWindowClosesConfigure the suppression to emit only the "final results" from the window. By default all Streams operators emit results whenever new results are available. This includes windowed operations. This configuration will instead emit just one result per key for each window, guaranteeing to deliver only the final result. This option is suitable for use cases in which the business logic requires a hard guarantee that only the final result is propagated. For example, sending alerts. To accomplish this, the operator will buffer events from the window until the window close (that is, until the end-time passes, and additionally until the grace period expires). Since windowed operators are required to reject out-of-order events for a window whose grace period is expired, there is an additional guarantee that the final results emitted from this suppression will match any queryable state upstream.
bufferConfig- A configuration specifying how much space to use for buffering intermediate results. This is required to be a "strict" config, since it would violate the "final results" property to emit early and then issue an update later.
- a "final results" mode suppression configuration
untilTimeLimitstatic <K> Suppressed<K> untilTimeLimit(Duration timeToWaitForMoreEvents, Suppressed.BufferConfig bufferConfig)Configure the suppression to wait
timeToWaitForMoreEventsamount of time after receiving a record before emitting it further downstream. If another record for the same key arrives in the mean time, it replaces the first record in the buffer but does not re-start the timer.
- Type Parameters:
K- The key type for the KTable to apply this suppression to.
timeToWaitForMoreEvents- The amount of time to wait, per record, for new events.
bufferConfig- A configuration specifying how much space to use for buffering intermediate results.
- a suppression configuration
withNameUse the specified name for the suppression node in the topology.
This can be used to insert a suppression without changing the rest of the topology names (and therefore not requiring an application reset).
Note however, that once a suppression has buffered some records, removing it from the topology would cause the loss of those records.
A suppression can be "disabled" with the configuration
name- The name to be used for the suppression node and changelog topic
- The same configuration with the addition of the given