How to update a message using ExcerptTailer?

32 views
Skip to first unread message

Mickael Marrache

unread,
May 8, 2016, 7:44:44 AM5/8/16
to Chronicle
Hi,

I often read that ExcerptTailer can be used to update a message in a queue but I can't find any relevant method.

Should an appender be used instead?

Thanks,
Mickael

Peter Lawrey

unread,
May 8, 2016, 9:29:09 AM5/8/16
to java-ch...@googlegroups.com
Hi,

You can update a message via a Tailer writing to the underlying wire.bytes(), or reading using bound values i.e. values that when you update them, you alter the original record.

Regards,
    Peter.

--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mickael Marrache

unread,
May 8, 2016, 10:49:30 AM5/8/16
to Chronicle
My goal is to keep an output queue that will always include one value which represents the index of the last successfully processed message.

Therefore, instead of appending indexes, I prefer to update it so that my output queue never grows.

I looked for something related to bound values in the ExcerptTailer interface, but can't see anything relevant...

Peter Lawrey

unread,
May 8, 2016, 1:21:35 PM5/8/16
to java-ch...@googlegroups.com
While you can do as you suggest, the pattern to use is storing the result of each message in an output queue and replaying from there.


Note: if you roll the files often, the value you want to store will also be rolled.

You can instead mark each message as processed.
Reply all
Reply to author
Forward
0 new messages