How to delete and update entries from Chronicle Queue

748 views
Skip to first unread message

Sithu Aung

unread,
Feb 7, 2015, 1:47:09 PM2/7/15
to java-ch...@googlegroups.com
I've checked the Javadoc and couldn't find any methods to update or delete entries from a Chronicle Queue. Excerpt/ExcerptTailer/ExcerptTailer don't seem to support update or delete operation. Or do I need to use something like Chronicle-Map instead?

Thanks,

Sithu

Rob Austin

unread,
Feb 7, 2015, 2:58:02 PM2/7/15
to java-ch...@googlegroups.com

For us to suggest if you should use the queue or map - what is the problem you wish to solve ? In other words, why do you want to delete elements/entries ?



--
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.

Peter Lawrey

unread,
Feb 7, 2015, 3:31:58 PM2/7/15
to java-ch...@googlegroups.com

Excerpt and ExcerptTailer supports updating an existing but it can't change it's size.
To delete an entry you can alter it to make it as deleted. It is let to you decide the best way to do this.
Why do you want to delete an entry?

It is possible Map is a better fir for what you are doing or perhaps a combination of the two.

Sithu Aung

unread,
Feb 9, 2015, 1:42:57 AM2/9/15
to java-ch...@googlegroups.com
Thanks for the suggestions. I wanted to store all failed requests in the Chronicle and later retry by a background job. On every retry, an retry count will be updated and will be deleted upon success. Then, the queue will be self-managed and will never have to do the clean-up. Alternatively, I've already started looking into Chronicle-Map, but I'm currently stuck at missing Maven dependency issue.

Peter Lawrey

unread,
Feb 9, 2015, 2:29:10 AM2/9/15
to java-ch...@googlegroups.com

I would make sure you have version 2.1.0 of map. Previous versions has problems with xstream dependencies.

Taku H

unread,
Aug 10, 2015, 10:02:58 AM8/10/15
to Chronicle
Hi Peter,
I have a question regarding this reply. I understand that ExcerptTailer supports updating an existing, but is there anyway to apply the change to Sink-Q as well?

Peter Lawrey

unread,
Aug 10, 2015, 1:52:55 PM8/10/15
to java-ch...@googlegroups.com
Hi Taku,
   You can change the Sink-Q, however this will not change for the server, only the local copy will be changed.

Regards,
   Peter.

Taku H

unread,
Aug 11, 2015, 5:07:08 AM8/11/15
to Chronicle
Thanks Peter. In my understanding and some experiments, It's otherway around. If we modify source-Q, the change will not be automatically applied/copied to Sink-Q, so we need to separately modify SinkQ. Am I correct?

Peter Lawrey

unread,
Aug 11, 2015, 12:31:38 PM8/11/15
to java-ch...@googlegroups.com
Correct, once the thread handling the copying of the data to the client has been sent, it will not be sent again, even if you change it.
The only way around this is to add a short message with the details of the change even though it might alter an earlier message.
Reply all
Reply to author
Forward
0 new messages