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

Blocking Code #11

Open
rkass opened this issue Oct 29, 2018 · 1 comment
Open

Blocking Code #11

rkass opened this issue Oct 29, 2018 · 1 comment

Comments

@rkass
Copy link
Contributor

rkass commented Oct 29, 2018

this sleep could be avoided:
https://github.com/disneystreaming/pg2k4j/blob/master/src/main/java/com/disneystreaming/pg2k4j/SlotReaderKinesisWriter.java#L140

One option is instead on continually looping and holding onto the thread it may be possible to instead change the state (i.e. stop retrying) and schedule an async retry which will on success continue normal processing - that way you’re not blocking any threads.

@jwarchol
Copy link

Reference in this public OSS repo https://github.com/disneystreaming/pg2k4j/blob/master/src/main/java/com/disneystreaming/pg2k4j/SlotReaderKinesisWriter.java#L140

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