-
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
resolves #72 introduce a recovery queue #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs some docs
Yes. |
078a10a
to
abedc8d
Compare
Documentation added. I think we need to decide if we want to emit a warning or emit an event when an error occurred while writing data to the TCP socket. There are two cases where we write data to the TCP socket:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks! |
Introduce a recovery queue in order to store data when the connection is lost and send them when the connection is established again.
New options:
recovery
: Enable recovering data when reconnecting after the connection was dropped. Default:false
.recoveryQueueSizeCalculation
: Function used to calculate the size of stored elements. Default:element => element.data.length + element.encoding.length
.recoveryQueueMaxSize
: Positive integer to track the sizes of items added to the cache, and automatically evict items in order to stay below this size. Default:Infinity
This feature is disabled by default.
Should we emit a warning if the user enables this feature without a max size?
Since I've updated the Readme.md in #71, I will add documentation for them once #71 is merged.
Resolves #72