Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Problem about use 'MqttCallBack.deliveryComplete()' method


I see you posted the same question to Stackoverflow as well.

I think the best people to answer it are likely to be Nick and Dave, and I don't know for sure but I suspect they may be on vacation this week - hopefully we can get an answer for you shortly though!

One thought though - are you using QoS 0? if so, according to the javadoc:

"Quality of service 0 - indicates that a message should be delivered at most once (zero or one times). The message will not be persisted to disk, and will not be acknowledged across the network. This QoS is the fastest, but should only be used for messages which are not valuable - note that if the server cannot process the message (for example, there is an authorization problem), then an exception will not be thrown, nor will a call be made to MqttCallback#deliveryFailed(MqttDeliveryToken, MqttException) or MqttCallback.deliveryComplete(MqttDeliveryToken). Also known as "fire and forget"." 


On Thu, Jun 7, 2012 at 7:59 AM, xu zhangxuan <plucury@xxxxxxxxx> wrote:
Sorry, the token would not be null, but the MqttMessage in it was null :-)

在 2012-6-7,下午2:49, xu zhangxuan 写道:

> hi,guys:
>       I want to do some actions when the message was published.And I want to implement the method.But I got a problem, Once a message was sent, its token would set to null too.So how can I determine which message was sent?

paho-dev mailing list

Andy Piper | Farnborough, Hampshire (UK)
blog:   |   skype: andypiperuk
twitter: @andypiper  |  images:

Back to the top