moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 508 forks source link

Client connect/disconnect events also triggering 'published' events #601

Closed manikawnth closed 7 years ago

manikawnth commented 7 years ago

Hi,

When a client publishes a messages, the connect and disconnect events are also emitting published events. Is this a design necessity? Or can we just emit published event only for message topics and not client topics ?

This is the line I'm referring https://github.com/mcollina/mosca/blob/master/lib/server.js#L383

mcollina commented 7 years ago

It is a necessity. You should filter based on topic.