Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global message id resets every time I connect #113

Closed
avaan opened this issue Nov 14, 2016 · 4 comments
Closed

global message id resets every time I connect #113

avaan opened this issue Nov 14, 2016 · 4 comments
Labels

Comments

@avaan
Copy link

avaan commented Nov 14, 2016

I wanted to retain the global message id (CocoaMQTT.gmid).

Is their any way I can save this value and reset it to old value when I connect back.

@avaan
Copy link
Author

avaan commented Nov 30, 2016

@CrazyWisdom I am using CocoaMQTT in my project.

I need to generate and control the "gmid" in my application.

Can you please modify the code to allow to set "gmid" variable of CocoaMQTT?

or can you please provide override functions similar to below

open func publish(msgId:UInt16, _ message: CocoaMQTTMessage) -> UInt16
open func subscribe(msgId:UInt16, _ topic: String, qos: CocoaMQTTQOS = .qos1)
open func unsubscribe(msgId:UInt16, _ topic: String)

with which I can pass my gmid.

@avaan
Copy link
Author

avaan commented Jan 25, 2017

@CrazyWisdom @emqplus I am using this framework. Now I am facing some server ack problem with gmid. it will be great if you allow me to handle "gmid" from my application.

@alexyu1989
Copy link
Contributor

@avaan Sorry, gmid can not be rewrite. Because gmid is used to distinguish between different messages. If 2 messages have the same id, the server may be confused.

@avaan
Copy link
Author

avaan commented Mar 20, 2017

@CrazyWisdom thanks for your repose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants