0

Hi looking at Chronicle v3 what happens if the consumer reads a record of the queue then tries to do something with that record downstream but fails.

Can that record be picked up from the queue again? Does everything need to be replayed?

Thinking of using Chronicle Queue to queue a bunch of json documents and batch them to Elasticsearch :)

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
user432024
  • 4,392
  • 8
  • 49
  • 85

1 Answers1

1

You need either to store the index of the record successfully processed like:

if(tailer.nextIndex()) {
    process(tailer);

    saveIndex(tailer.index());
    tailer.finish(); 
}

Then upon restart you can wind to the last saved index:

tailer.index(savedIndex());
Luca Burgazzoli
  • 1,216
  • 7
  • 9