Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] R: R: PAHO JS WILDCARDS

Thank you very much Nick!

Really useful!

Goodbye!

See you soon and thank you very much again!

 

Andrea Limoli

Software Engineer

Autoware S.r.l. Unipersonale

Powering Intelligence in production

www.autoware.it

 

 

Da: paho-dev-bounces@xxxxxxxxxxx [mailto:paho-dev-bounces@xxxxxxxxxxx] Per conto di Nicholas O'Leary
Inviato: venerdì 4 marzo 2016 11:43
A: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Oggetto: Re: [paho-dev] R: PAHO JS WILDCARDS

 

You need to manage your subscriptions in your application; that is how the MQTT protocol works under the covers.

 

Nick

 

On 4 March 2016 at 10:23, Andrea Limoli <andrea.limoli@xxxxxxxxxxx> wrote:

Thank you very much for the fast answer.

Yes, this is it.

Isn’t there other way to do it or an option?

 

Thank you very much!

 

Andrea Limoli

Software Engineer

Autoware S.r.l. Unipersonale

Powering Intelligence in production

www.autoware.it

 

 

Da: paho-dev-bounces@xxxxxxxxxxx [mailto:paho-dev-bounces@xxxxxxxxxxx] Per conto di Nicholas O'Leary
Inviato: venerdì 4 marzo 2016 11:15
A: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Oggetto: Re: [paho-dev] PAHO JS WILDCARDS

 

Hi,

 

If I've understood your question correctly, when you unsubscribe, you must do so using the exact topic string you used to subscribe with.

 

This means, if you did the following:

 

client.subscribe(“Data/Reading”);

client.subscribe(“Data/Version”);

client.unsubscribe(“Data/#”);

 

You would still be subscribed to the first two topics. You would need to explicitly unsubscribe from those topics to stop receiving messages on that subscription:

 

client.subscribe(“Data/Reading”);

client.subscribe(“Data/Version”);

client.unsubscribe(“Data/Reading”);

client.unsubscribe(“Data/Version”);

 

 

Nick

 

 

 

On 4 March 2016 at 10:01, Andrea Limoli <andrea.limoli@xxxxxxxxxxx> wrote:

Good morning everybody,

 

I’m using your Paho Client (_javascript_) library in order to connect me to a Mosca Server (Node.js).

My problem is about the wildcards use.

 

These are my topics:

·         Data/Reading

·         Data/Version

·         Data/SN

 

I would subscribe just one of these topic at a time.

So, I made this in order to allow only one topic:

 

client.unsubscribe(“Data/#”);

client.subscribe(“Data/Reading”);

 

This doesn’t work.

Only subscribe works with the wildcards.

 

client.subscribe(“Data/#”);

 

This command does the subscription of the three topics, but this is not useful for me.

 

I would understand if possible the regarding problem.

 

Thank you very much in advance.

Best regards.

 

Andrea Limoli

Software Engineer

Immagine Firma

 

 


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

 


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

 


Back to the top