Fetched token MultiSourceTrackingToken

Hello,

I get in the log the below messages

INFO |[EventProcessor[process-v1]-0] - Released claim
INFO |[EventProcessor[process-v1]-0] - Fetched token: MultiSourceTrackingToken{cntx1=IndexTrackingToken{globalIndex=8520},cntx2=IndexTrackingToken{globalIndex=972}} for segment: Segment[0/0]

When i decrypt the token of the processor name process-v1 i get the below result

{
  "trackingTokens": {
    "cntx1": {
      "@c": ".GlobalSequenceTrackingToken",
      "globalIndex": 8522
    },
    "cntx2": {
      "@c": ".GlobalSequenceTrackingToken",
      "globalIndex": 972
    }
  }
}

So my question is why this message is displayed in the log and why the index of the context cntx1 in the log is not equal to the index of table trackingtokens

Hey @Aymen_Kanzari, let me give you some insights.

The TrackingEventProcessor simply logs on INFO level when it opens the event stream for the first time. So, just a notification, nothing to worry about.

The fact it logs a MultiSourceTrackingToken points to a configuration where you have defined a MultiStreamableMessageSource for said TrackingEventProcessor.
So, an Event Processor that consumes events from two different sources / contexts.

More specifically, two sources that you have called cntx1 and cntx2.

I am not sure what you’re pointing at with your question here, @Aymen_Kanzari.
Know that the token’s position, so the globalIndex, is an ever moving point when you are looking at a live system.

This happens, because a live system will have events occur the entire time.
The TrackingEventProcessor will track those events as they happen as fast as possible. And with every event handled, the position of the token is updated.

So, there is a window of opportunity when you check a logged token and compare it with the token_entry table’s entry of the same token (identifiable by the processorName field) that the values do not align.

However, as may be apparent from my first reply, I am not 100% sure what you’re actually looking for with your question. So, if this does not answer the question, please be more specific in your text. Thanks!

Ow, and if it does clarify things, I am happy to help!