Closed ghost closed 7 years ago
my situation is:
all device's clientId is recoreded in DB, I need to publish message to some client filter by id. Is there any method to get the client object by id? or should I just use:
client object
server.publish(packer, { id: 'clientId' })
Try server.clients[id], however this will return the client connected to that specific broker.
server.clients[id]
The best approach is for each client to have its own topic, and publish messages there.
thank you,solved my problem
my situation is:
all device's clientId is recoreded in DB, I need to publish message to some client filter by id. Is there any method to get the
client object
by id? or should I just use: