Class Tracker
java.lang.Object
io.fluxzero.sdk.tracking.Tracker
Represents the client-side tracking context during message consumption in Fluxzero.
This Tracker is used locally in a Fluxzero application to provide filtering and stateful context when
consuming message batches. It is automatically set as a thread-local variable for the duration of batch processing,
allowing handlers and other logic to access it via current().
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ThreadLocal<Tracker> Thread-local variable that holds the current tracker instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(DeserializingMessage message, String routingKey) When the consumer is configured withignoreSegment=true, segment filtering is performed client-side.current()Returns the current tracker instance, if any.getName()Returns the name of the consumer associated with this tracker.
-
Field Details
-
current
Thread-local variable that holds the current tracker instance. This is automatically set by the Fluxzero Java SDK.
-
-
Constructor Details
-
Tracker
public Tracker()
-
-
Method Details
-
current
-
getName
Returns the name of the consumer associated with this tracker. -
canHandle
When the consumer is configured withignoreSegment=true, segment filtering is performed client-side. This method uses the currentMessageBatchto determine whether a given message should be processed by the current tracker, based on:- The segment range of the batch
- The index of the message relative to the current
Position
- Parameters:
message- The message to checkroutingKey- The routing key to base the check on
-