Skip to main content



      Home
Home » Eclipse Projects » Kura » custom topic(is any easy way to set my topic template)
custom topic [message #1832895] Mon, 28 September 2020 20:29 Go to next message
Eclipse UserFriend
Hi all,

i read kura docs and tryng to find in source code. I know by default with CloudServicePublisher kura pubs in #account-name/#device-id/#app-id/<app-topic> and in $EDC/<account-name>/<device-id>/<app-id>/<method>/<resource-path> if control data message. I need to change this template to simplify communication with my cloud service. Is there any easy way to do it, not to create my own CloudEndpoint.

Regards
Re: custom topic [message #1832910 is a reply to message #1832895] Tue, 29 September 2020 03:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
the structure <account-name>/<device-id>/<app-id>/<app-topic> cannot be changed if not with a new cloud service bundle that needs to be created with your new structure.

As far as I know, the only thing you can decide is the control topic prefix that you can change in the cloud connection preferences plus other minor changes. But the topic structure, as of now, is fixed in the default cloud connection.

Best regards,
Matteo
Re: custom topic [message #1832915 is a reply to message #1832910] Tue, 29 September 2020 05:56 Go to previous messageGo to next message
Eclipse UserFriend
This news are not very good(

Thanks for the reply!
Regards.
Re: custom topic [message #1832973 is a reply to message #1832915] Wed, 30 September 2020 04:49 Go to previous messageGo to next message
Eclipse UserFriend
Use the dataService inside your bundle. With the dataService you can publish messages with your own topic.

[Updated on: Wed, 30 September 2020 04:49] by Moderator

Re: custom topic [message #1832979 is a reply to message #1832973] Wed, 30 September 2020 05:19 Go to previous messageGo to next message
Eclipse UserFriend
i wanna try to do this:
for the template take org.eclipse.kura.cloudconnection.eclipseiot.mqtt.provider
change there this string
sb.append(topicPrefix).append(topicSeparator).append(topicSeparator);
then append there account and client id tokens.
So i have forvarding question:
in publishDisconnectCertificate() or the same functions we put in topic tokens, such as #account-name, do default DataService changes them to the values seted in config?
bsc in source code topic made by this :
sbTopic.append(this.options.getTopicControlPrefix()).append(CloudServiceOptions.getTopicSeparator())
.append(CloudServiceOptions.getTopicAccountToken()).append(CloudServiceOptions.getTopicSeparator()) .append(CloudServiceOptions.getTopicClientIdToken()).append(CloudServiceOptions.getTopicSeparator())
.append(CloudServiceOptions.getTopicDisconnectSuffix());
and then called:
this.dataService.publish(topic, ...
without any render templates.

Thx for soon answer,
Best regards
Re: custom topic [message #1847846 is a reply to message #1832973] Wed, 10 November 2021 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
can you spezify on how to use the DataService to change topics?
I am new to Kura and stuck with this issue. I need to connect to Hono using a different namespace.

Best regards,
Alessa
Re: custom topic [message #1847892 is a reply to message #1847846] Thu, 11 November 2021 11:38 Go to previous message
Eclipse UserFriend
"Hi, changing the way the topics are built in the CloudConnectionManagerImpl will definitely changes the topics syntax, the dataservice does not modify the topic.
Previous Topic:Kura on RaspberryPI4 8GB Ram on Ubuntu 18.04
Next Topic:IntelliJ IDEA support
Goto Forum:
  


Current Time: Sun Jun 15 15:31:46 EDT 2025

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

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

Back to the top