Closed pricelessrabbit closed 4 years ago
if you can test this PR https://github.com/mainflux/export/pull/25
If using Ubuntu or similar OS, to simulate disconnection you can use firewall and tcpkill ( you need to install )
sudo ufw deny out 1883; sudo tcpkill -i wlp3s0 port 1883
then renable port
sudo ufw allow out 1883
Thanks for the rapid fix. Question: looking at the PR i see that now paho storage is used. Is the redis service still nedeed for to persist data or can i drop it?
If using Ubuntu or similar OS, to simulate disconnection you can use firewall and tcpkill ( you need to install )
Looks too complicated. I prefer to unplug ethernet cable or power off the router ( and see the other team members swear).
@PricelessRabbit yes, Redis Streams has been removed and we use MQTT QoS for buffering. It has a few limitations, but it is simpler, easier to maintain and covers most of the use-cases.
Hi, there is a possible issue when the internet connection is lost and export service cannot connect with the mqtt uplink. This (in my case) results in data loss. In particular seems that the exporter stops to process the incoming NATS messages.
environment
I used a dockerized environment with all the edge stack
exporter config
Steps to reproduce
I started a go test executable that publish a message in the
export.message
NATS subject. The exporter relay the messages to the mainflux cloudI tried to power off the internet connection to simulate a network issue. After that (2020-07-30T13:13:17.577859377Z) the exporter sends some out-of-order messages (I guess the ones that was stored in the redis stream) but then it got stuck. After the message 184 it doesn't produce any logs but in the meantime the go test service continues to publish messages in the NATS subject. If I restart the exporter, it starts to send the new messages but all the data between the "stuck" state and the restart seems to be lost