processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/ejabberd/
Other
6.11k stars 1.51k forks source link

Ejabberd MQTT Session and Subscriptions Are Expiring After Some time #3887

Closed syedzahidulla closed 2 years ago

syedzahidulla commented 2 years ago

I have an app which subscribers to mqtt broker of ejabberd. if iam coming online very often then iam able to receive offline messages.

But if i close the app and come online after 3 -4 hrs then iam not able to receive messages and when i check in webadmin mqtt_session tables doesn't have any session.

badlop commented 2 years ago

See https://docs.ejabberd.im/admin/configuration/modules/#mod-mqtt

session_expiry: timeout()
 The option specifies how long to wait for an MQTT session resumption.
 When 0 is set, the session gets destroyed when the underlying client connection is closed.
 The default value is 5 minutes.
syedzahidulla commented 2 years ago

It takes value in seconds or minutes..I have kept 100 thinking minutes but its now working

prefiks commented 2 years ago

It takes both, you can use for example 5mins for 5 minutes

syedzahidulla commented 2 years ago

Ok Thanks