Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » custom topic(is any easy way to set my topic template)
custom topic [message #1832895] Tue, 29 September 2020 00:29 Go to next message
Alex Alexandrov is currently offline Alex AlexandrovFriend
Messages: 3
Registered: September 2020
Junior Member
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 07:03 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
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 09:56 Go to previous messageGo to next message
Alex Alexandrov is currently offline Alex AlexandrovFriend
Messages: 3
Registered: September 2020
Junior Member
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 08:49 Go to previous messageGo to next message
Martin Biskup is currently offline Martin BiskupFriend
Messages: 9
Registered: September 2020
Junior Member
Use the dataService inside your bundle. With the dataService you can publish messages with your own topic.

[Updated on: Wed, 30 September 2020 08:49]

Report message to a moderator

Re: custom topic [message #1832979 is a reply to message #1832973] Wed, 30 September 2020 09:19 Go to previous messageGo to next message
Alex Alexandrov is currently offline Alex AlexandrovFriend
Messages: 3
Registered: September 2020
Junior Member
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 10:18 Go to previous messageGo to next message
Alessa Maylin is currently offline Alessa MaylinFriend
Messages: 1
Registered: November 2021
Junior Member
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 16:38 Go to previous message
Salvatore Coppola is currently offline Salvatore CoppolaFriend
Messages: 2
Registered: October 2021
Junior Member
"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: Fri May 03 23:51:07 GMT 2024

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

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

Back to the top