Class NoOpFlowRegulator
java.lang.Object
io.fluxzero.sdk.tracking.NoOpFlowRegulator
- All Implemented Interfaces:
FlowRegulator
A no-op implementation of the
FlowRegulator interface that never requests a pause.
This regulator allows the consumer to fetch and consume messages without any delay or throttling. It is the default regulator used in most cases, where message flow is unbounded or externally managed (e.g. through batch sizes, thread limits, or backpressure at other levels).
Behavior:
pauseDuration()always returnsOptional.empty(), indicating the consumer should never pause.- Ideal for high-throughput scenarios where flow regulation is unnecessary or handled outside the Fluxzero Runtime.
- Thread-safe and stateless — a single shared instance is used throughout the application.
Usage Example
This is the default unless overridden inConsumer or
ConsumerConfiguration.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptionally pause this consumer for a given amount of time.
-
Constructor Details
-
NoOpFlowRegulator
public NoOpFlowRegulator()
-
-
Method Details
-
pauseDuration
Description copied from interface:FlowRegulatorOptionally pause this consumer for a given amount of time. During this time the consumer will not fetch or consume any messages.After the given pause duration, this method will be called again to determine if fetching should continue or be paused for longer – i.e., the consumer will not continue until this method returns an empty optional.
- Specified by:
pauseDurationin interfaceFlowRegulator
-