Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho Java : get the granted QoS after subscribing

Ah, Sorry I hadn't realised you were asking about MqttClient, as it happens an issue was recently raised about this.
 
If you use the SNAPSHOT version of the client, you'll find that MqttClient now has a number of subscribeWithResponse methods available which will return you an IMqttToken as the MqttAsyncClient does. Hope that helps!
 
Kind regards,
 
James Sutton
Software Engineer - IoT Foundation - MQTT Open Source Projects
Ops Team - Wimbledon Project

Phone: 01962 815438 | Extension: x372454
E-mail: 
Personal Website: www.jsutton.co.uk
Find me on:      
IBM

Hursley Park
HursleySO212JN
United Kingdom
 
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
 
 
----- Original message -----
From: Paolo Patierno <ppatierno@xxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Cc:
Subject: Re: [paho-dev] Paho Java : get the granted QoS after subscribing
Date: Wed, Sep 21, 2016 8:45 AM
 
Hi James,

I see that all subscribe overloads in the MqttClient class have void as return type. No way to get the IMqttToken.
I think you are speaking about the MqttAsyncClient ... got it ;)

Thanks,
Paolo

Paolo Patierno
Senior Software Engineer (IoT) @ Red Hat
Microsoft MVP on Windows Embedded & IoT
Microsoft Azure Advisor 

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
 

From: james.sutton@xxxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Date: Wed, 21 Sep 2016 07:32:51 +0000
Subject: Re: [paho-dev] Paho Java : get the granted QoS after subscribing
 
Hi Paolo,
 
When you subscribe to a topic, you will have an IMqttToken returned. Once you get that have have waited for completion, you should be able to use getGrantedQos to retrieve the granted QoS: https://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/IMqttToken.html#getGrantedQos--
 
Kind regards,
 
James Sutton
Software Engineer - IoT Foundation - MQTT Open Source Projects
Ops Team - Wimbledon Project

Phone: 01962 815438 | Extension: x372454
E-mail: james.sutton@xxxxxxxxxx
Personal Website: www.jsutton.co.uk
Find me on:      
IBM

Hursley Park
HursleySO212JN
United Kingdom
 
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
 
 
----- Original message -----
From: Paolo Patierno <ppatierno@xxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: "paho-dev@xxxxxxxxxxx" <paho-dev@xxxxxxxxxxx>
Cc:
Subject: [paho-dev] Paho Java : get the granted QoS after subscribing
Date: Wed, Sep 21, 2016 8:15 AM
 
Hi all,

I'm using the Paho Java implementation but I can't find a way to know the granted QoS when I subscribe to a topic.
I'm searching for info in the API without success.

Thanks,
Paolo.

Paolo Patierno
Senior Software Engineer (IoT) @ Red Hat
Microsoft MVP on Windows Embedded & IoT
Microsoft Azure Advisor 

Twitter : @ppatierno
Linkedin : paolopatierno
Blog : DevExperience
_______________________________________________
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
 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


_______________________________________________ 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
 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Back to the top