<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>mqtt, topics</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68765/mqtt-topics</link><description>Hello, 
 I am having some trouble retrieving the mqtt topic which are published on, and the data within. 
 I&amp;#39;ve used the mqtt_simple as a starting point. 
 
 I managed to printk, the momentary topic, used with : printk(&amp;quot;Topic: %s\n&amp;quot;, evt-&amp;gt;param.publish</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Nov 2020 12:03:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68765/mqtt-topics" /><item><title>RE: mqtt, topics</title><link>https://devzone.nordicsemi.com/thread/282044?ContentTypeID=1</link><pubDate>Thu, 26 Nov 2020 12:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5776132d-3344-487b-8f01-31c727fd830d</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi David,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]I need a way to store the topic so that I can differenciate between the published topic, and also store the data within a variable for later use.[/quote]
&lt;p&gt;&amp;nbsp;Where do you want to store the topic and data?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Or do you plan to connect the nrf9160 device to a computer and print/send topic and data over to the computer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Usually when sending data form the nrf9160 over mqtt to som other service like a cloud that subscribes to the topics the nrf9160 publishes data to, the data is stored not on the nrf9160 device but on some sever somewhere.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/software-and-protocols/posts/connecting-to-aws-cloud-services-using-the-nrf9160"&gt;Here is a guide&lt;/a&gt; to one possible way to save the data and topics for later use using AWS. There are other guides, blog posts and tutorials here on devzone that might be helpful.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>