Skip to content
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

Observable message loss is undocumented #3073

Open
wfhartford opened this issue Nov 23, 2021 · 2 comments
Open

Observable message loss is undocumented #3073

wfhartford opened this issue Nov 23, 2021 · 2 comments

Comments

@wfhartford
Copy link

I have a jet batch job which produces a large number of results (several millions). The sink in this job is an observable, which is used to collect and deliver the results. In the course of job execution, I get a large number of warnings logged along the lines of

Message loss of 1000 messages detected in listener 'afe1cde4-4725-4c74-99ba-8f8eb1309ac1/__jet.observables.4f713bed-ea30-4095-a295-f2c75afc26de'

A brief look through the observable code has lead me to believe that there is no back-pressure mechanism, so this situation is expected when a large number messages are produced to an observable very quickly.

While this unreliable delivery system is a reasonable design decision, it does not appear to be documented in any way, I believe it should be.

@frant-hartm
Copy link
Collaborator

Hi @wfhartford , thanks for reporting this.

There is a note in the documentation for the observable sink:

Jet internally uses Hazelcast's Ringbuffer to create a temporary buffer to write the results into and these are then fetched by the client:

It's worth noting that Ringbuffer may lose events, if they are being produced at a higher-rate than the clients can consume it. There will be a warning logged in such cases. You can also configure the capacity using the setCapacity() method on the Observable.

https://jet-start.sh/docs/api/sources-sinks#observables

We can add this info to javadoc as well, is there any other place where you would expect to see this info?

@wfhartford
Copy link
Author

Ahh, thanks, I missed that part of the docs. I tend to stick to Javadocs as I'm coding and use the docs you linked to more as a general guide to point me in the right direction. I would have expected to see a note about losing events in the Observable interface javadoc, probably in the second or third paragraph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants