voryx / Thruway

PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging Protocol) for Real-Time Application Messaging
MIT License
676 stars 117 forks source link

Autosubscribe client on topic #339

Closed hartois closed 4 years ago

hartois commented 4 years ago

Hello I want create one topic per user such as user. How can I auto-subscribe client on this topic after authentification?

cyprus1spirit commented 4 years ago

You need to register the user as a topic as you capturing it via ZQM push php code from your application (tcp file to file connection on localhost). Your application then spits the javascript to the browser with the respective name as a topic and connects to the server.

My main concern I want to ask. If a user disconnects the single respective topic becomes deleted too? Or it remains in memory????

thanks

mbonneau commented 4 years ago

When a user unsubscribes from a topic, the subscription does not stay in memory.