-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliability issue during failures to write to KDB #10
Comments
To add feedback from Chronicle around ideal setup: The mechanism I prefer is one of the below: Alternatively you can use a Chronicle Queue named tailer (StartFromStrategy=NAMED) to record where you were up to in reading the queue. However, this will only work if you can guarantee that events have been committed to the external system if your method reader returns without an exception - see below. If your integration service is reading from a Chronicle Queue using either try (DocumentContext dc = tailer.readingDocument()) { … or with a method reader, then throwing an exception from inside the try block, or from the method reader method, will rollback the read from the queue. The next time you try to read from the tailer you will get the same message. This provides a simple re-try mechanism if the external service is transiently unavailable. The first mechanism could be used to fix this adapter but you would have to add eventTime to your KDB rows. |
Hi @jarkaxi, We'll be picking this up from today and will assign someone to look into it immediately and hopefully have an update for you soon Thanks for spotting and the leg work with Chronicle also Brien |
Hi @jarkaxi Tin has merged a fix on this last week, I've left the issue open in the hopes you get a chance to take a look before we resolve |
Hi @BGillenDI, That looks like it should work, might be worth noting that you've changed the messaging guarantee form "exactly once" to "at least once" - e.g. KDB could potentially receive the same message more than once - I'm assuming that doesn't have an implication normally? this is in the case that trySend will send the message to KDB but then it crashes straight after KDB has received & confirmed reception of the message |
Hi @jarkaxi, thanks for pointing this out. You are correct, the fix effectively removes a high chance (higher with larger |
Hi @Tin-Pui , Apologies for the late reply, I believe what you're suggesting is the preferred way of doing this and what Chronicle have advised. Storing the EventTime (which is guaranteed unique per event stream) with the object and retrying from the latest point that you have successfully written is best. On start-up you then would read from the back of the queue backwards to the last eventTime written and then start replaying from there. Best, Jark |
Hi,
I've been reading through your code to see how it works. I did spot an issue with the reliability of the process and wanted to highlight this.
In https://github.com/DataIntellectTech/kdb-chronicle-queue/blob/main/Adapter/src/main/java/uk/co/aquaq/kdb/adapter/chronicle/ChronicleToKdbAdapter.java#L215 it does the following:
Best,
Jark
The text was updated successfully, but these errors were encountered: