-
Notifications
You must be signed in to change notification settings - Fork 10
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
Erroneous data tries to resend forever. #1
Comments
I missed the fact that this uses retained memory for the queue and so a simple reset failed to purge the erroneous data. So this morning, I had to cut power to device to clear the bad data. |
So my corrupted data was causing crashes when it tried to upload, I'm approaching this by modifying the checkQueueState() by calling a validation function that checks for garbage in the event and discarding the event as suggested by @atwalsh in #9
|
I recently started using this library and in testing today I have some erroneous data that was published. I'm not sure what generated the erroneous data but I am using an RS232 barcode scanner to read barcodes. The erroneous data will sit in the queue and resend forever. This blocks any subsequent, good, data from ever getting published. I would recommend a way of tracking the number of retries and setting a limit to the number of retries. If the limit is reached, the bad data can be deleted from the queue.
I would also suggest an option on the constructor which would allow the queue to skip over the retry data and send subsequent messages in the queue. Then it could still retry the first message as needed within the retry timeout. This would cause the published messages to arrive out of order but in my case that is perfectly acceptable.
In this image, that erroneous data is trying to resend every 30 seconds. I tried to scan a new barcode but it goes into the queue and never gets published because the erroneous data is blocking any new publishes.
The text was updated successfully, but these errors were encountered: