I'm trying to run a ManagedClient (tried both 2.7.5 and 2.8.0-alpha5) in a Akka.NET actor (in an ASP.NET Core 2.1 app), and most of the time it works fine,
but if the client does lost connection to the broker, the client tries to reconnect, and some random exceptions gets printed to the console:
After that, the client stops working.
But the weird part is, if the client never gets connected in the first place (e.g. the broker is offline when the ASP.NET app starts), it correctly tries to reconnect until it gets connected.
Here's the actor code:
mqttActor.txt
Related to #288?
@laarlinn , I'm using the same libraries with no problems. Did you create an AKKA FSM to manage the whole process? (subscribing, connection, re-connection etc.).
I may share my microservice, if you need.
@JTrotta I'm not using FSM. I'd love to take a look at your code.
@laarlinn here you are
ENNIO.MqttClient.zip
I forgot to mention that my app is an ASP.NET Core 2.1 app.
The managed client works fine when used in a WPF app. Could it be the .NET Core 2.1 framework what is causing problems?
Also, when using the normal (non-managed) client, when it loses the connection to the broker it does the same thing (see trace.txt above) and won't fire the disconnected event. Tried with 2.8.0
2.8.2-rc1 fixed this.
Most helpful comment
Also, when using the normal (non-managed) client, when it loses the connection to the broker it does the same thing (see trace.txt above) and won't fire the disconnected event. Tried with 2.8.0