Connection get lost after some minutes of inactivity
LPascual-mk opened this issue · 2 comments
Hi, I am developing an ASP.NET MVC application using the MQTT library to receive messages from an Active MQ broker and store these messages in a database. To fire the connection and subscription to the broker in background I am using Hangfire at the startup of the application (global.asax)
I have a global object in the 'global.asax' file which contains the connection to the broker. My goal is that the connection and subscription to the queue remains active even when the web application is not opened in a browser, so I need a persistent subscription once I connect to the broker during application deployment.
The issue I am facing is that the connection gets lost after some minutes of inactivity. I have read that the library implements a keep alive mechanism but I don't know why my connection is getting lost. May be an issue with the definition scope of my MQTT client variable?
Thanks in advance!
+1
+1