Manually disconnect user from RT and messaging

How can i discount a user from the real time connection of the database and messaging?

i want the clientDisconnected event on the server to fire

Hello @mohammad_altoiher

Try to use the following methods:

Backendless.RT.disconnect()
Backendless.RT.connect()

Regards, Vlad

1 Like

Also, there is another method to remove all the subscriptions and disconnect from the RT Server

Backendless.RT.terminate()

i will try this
.connect() got some issues with double event listeners

@vladimir-upirov
Backendless.RT.terminate() will stop everything and you cant reconnect again so its not great.
so if i use:

Backendless.RT.disconnect()
Backendless.RT.connect()

does this mean i have to handle the connection manually after using disconnect()? so there will be no more auto retrying to re connect

The database events are firing multiple times after i use disconnect(); and connect();
i removed all the listeners for the data table with removeAllListeners(); and the subscriptions(); is empty.

yes, to reconnect you need to call connect()

please create a simple code snippet to reproduce the issue and we will take a look into it

Regards, Vlad