hmq icon indicating copy to clipboard operation
hmq copied to clipboard

Question about the struct 'subscription'

Open Andy320 opened this issue 8 years ago • 5 comments

@chowyu08 @MarcMagnin A newer for mqtt. I am curious what means the member 'queue' in the struct 'subscription' is? thanks true --> ? false --> ?

type subscription struct { client *client topic string qos byte queue bool }

Andy320 avatar Feb 08 '18 08:02 Andy320

Hi, @Andy320 I'm a bit new to the project as well so we'll have to wait for @chowyu08 ;) Regards.

MarcMagnin avatar Feb 08 '18 09:02 MarcMagnin

@MarcMagnin That's fine. I just go through the code , this may be related to the '$queue' in the cmd subscribe? @chowyu08

Andy320 avatar Feb 08 '18 10:02 Andy320

@Andy320 @MarcMagnin when 'queue' is true means the subscribe topic start with '$queue/', in the same topic group only one can receive the message. here

chowyu08 avatar Feb 08 '18 12:02 chowyu08

@chowyu08 @MarcMagnin Now I get it that the concept somehow is like the 'group' in kafka or the 'channel' in nsq. We can use it for example to do LB. And this feature is used for client<->server, not client<->client.

Andy320 avatar Feb 09 '18 02:02 Andy320

Does it support the Shared Subscription? I have no idea where it is wrote.

husy-dev avatar May 30 '19 02:05 husy-dev