You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The MQTT / HTTP / Websocket connection can be lost temporarily due f.ex. network issues, which can result in the loss of barcode events on the client side.
Describe the solution you'd like
Implement an event queue, which stores events temporarily when the connection drops, to be able to resend them when the connection is reestablished.
For the MQTT and HTTP notifiers, a simple (infinite) retry loop should be sufficient.
For websocket clients, events should be queued per client.
Since the queue could become very large over time when the service uptime is really long, events in the queue of individual clients should be automatically dropped when they are older than a specified amount of time. This should default to 2 hours and be user configurable via the YAML config file.
The text was updated successfully, but these errors were encountered:
Implementing message queuing for temporarily disconnected websocket is difficult, since there is no unique identifier of websocket clients between connections. For this reason it will not be implemented for this issue, and is moved to #28 instead.
* added event_queue processing to BarcodeNotifier
reworked websocket event messages into WebsocketNotifier
added BarcodeEvent data class for easier passing around
added type info
added comments
added docs
* added date property to BarcodeEvent data class
added config option for event drop timedelta threshold
drop events older than threshold
added config option for retry interval
improved error handling
* added "date" parameter to BarcodeEvent constructor
added "date" to event json
added simple test
updated README
* date fix
removed unused comments
* added autoreconnect to websocat example
Is your feature request related to a problem? Please describe.
The MQTT / HTTP / Websocket connection can be lost temporarily due f.ex. network issues, which can result in the loss of barcode events on the client side.
Describe the solution you'd like
Implement an event queue, which stores events temporarily when the connection drops, to be able to resend them when the connection is reestablished.
For the MQTT and HTTP notifiers, a simple (infinite) retry loop should be sufficient.
For websocket clients, events should be queued per client.
Since the queue could become very large over time when the service uptime is really long, events in the queue of individual clients should be automatically dropped when they are older than a specified amount of time. This should default to 2 hours and be user configurable via the YAML config file.
The text was updated successfully, but these errors were encountered: