moscajs / mosca

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

About handling topics #477

Closed anhldbk closed 8 years ago

anhldbk commented 8 years ago

I'm gonna make RPC calls using Mosca. The pattern is:

So, for every call, we will use one-time topics. How will Mosca handle such topics? If there's a large number of such topics, what consequences may be?

mcollina commented 8 years ago

I don't think it's a good idea to use MQTT for RPC. However, Mosca can deal with any number of topics Il giorno mer 18 mag 2016 alle 10:07 Anh Le notifications@github.com ha scritto:

I'm gonna make RPC calls using Mosca. The pattern is:

  • Subscribe to the topic which name is a generated uuid
  • Publish a message to a service subscribing solely to /service/check.
  • When the service finishes its job, it publishes the result to topic uuid

So, for every call, we will use one-time topics. How will Mosca handle such topics? If there's a large number of such topics, what consequences may be?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/mcollina/mosca/issues/477

anhldbk commented 8 years ago

@mcollina Thank you for your advice.