Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » CloudClient subscribe to global topic(Can the CloudClient subscribe to a topic meant for more than one client)
CloudClient subscribe to global topic [message #1708313] Tue, 15 September 2015 12:20 Go to next message
paul stanton is currently offline paul stantonFriend
Messages: 87
Registered: July 2009
Member
It seems the cloudClient implementation always prepends the [account_name]/[device_id]/[app_id] prefix for topics whether publishing or subscribing.

If I have a model of many similar devices and one controller (server) tracking them, it makes sense to send global messages from the controller ie:

controller.publish:
CONTROLLER/requestUpdate

client*.subscribe:
CONTROLLER/requestUpdate

However since CloudClient will always prepend the prefix to whatever subscriptions it makes, the clients will only subscribe to:

[account_name]/[device_id]/[app_id]/CONTROLLER/requestUpdate

therefore it is unsuitable for subscribing to one-to-many messages.

Is there a way to avoid this? I am hoping to use CloudClient to take advantage of its other benefits while still maintaining one connection.
Re: CloudClient subscribe to global topic [message #1708369 is a reply to message #1708313] Wed, 16 September 2015 01:16 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Paul,

Unfortunately, there is no way around the CloudClient topic structure without editing the source code. This topic structure is fundamental for sharing a single MQTT connection across multiple application and achieving topic partitioning and device identification.

You can use the DataService to achieve your goal, but you will lose some of the benefits of CloudClient.

Thanks,
--Dave
Previous Topic:How can I choose the bundles to be added to a custom deb?
Next Topic:Kura on Win10Iot
Goto Forum:
  


Current Time: Wed Sep 25 20:22:33 GMT 2024

Powered by FUDForum. Page generated in 0.25008 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top