-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Feature idea] Introduce a FIFO queue with a max size to store data when the TCP socket write is unsuccessful #72
Comments
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Yes, I can send a pull request for this feature! Do you have any preference regarding the FIFO queue implementation? Should we use an existing library? Should we use our own implementation to avoid adding a new dependency? |
I'll leave that to you and then review when a PR is open! |
ggrossetie
added a commit
to ggrossetie/pino-socket
that referenced
this issue
Jul 9, 2022
ggrossetie
added a commit
to ggrossetie/pino-socket
that referenced
this issue
Jul 9, 2022
ggrossetie
added a commit
to ggrossetie/pino-socket
that referenced
this issue
Jul 9, 2022
ggrossetie
added a commit
to ggrossetie/pino-socket
that referenced
this issue
Jul 18, 2022
mcollina
pushed a commit
that referenced
this issue
Jul 21, 2022
* resolves #72 introduce a recovery queue * remove suite * ensure that no error is thrown * default maxSize 1024 and remove arbitrary setTimeout * add documentation * copy editing and emit a warning when recovery failed * fix typo in comment * events consistency and update CLI * improve doc * copy editing * fix for node 14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The goal is to avoid "losing" data/logs when the TCP server is unavailable (for a short period of time). We should configure a max size to prevent unsafe unbounded storage (i.e. exhausting the memory).
To give you an idea of what I'm after, here's a naive implementation:
And in the reconnect/retry:
The text was updated successfully, but these errors were encountered: