Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Follow the instructions below to configure a gadget with pub-sub for inter-gadget communication:

...

  • publisher_channel_name -  this Publisher gadget the publishing channel is named as "publisher". Therefore, the data publishing takes place under the channel name "publisher". You can use the above code block in the respective event to publish data.
  • message - This refers to the publishing data that can be of any data type.

Step 2 - Configure a pub-sub link between the publisher and subscriber

In the above section, we looked at how to configure the pub-sub link between publisher and subscriberpublisher to publish data to a channel. Now, lets look at how to use the data coming through the publisher channel in the subscriber gadget for other functions.
Use the following code format, which defines a global method for subscribing, to get subscribed data via the subscriber channel:

...

What's Next?

Info

If you wish to try out get a sample better understanding on how inter-gadget communication works, see Sample 0 - Drill Down Drilldown Dashboard.