Create and Write to a Topic
Estimated reading time: 1 minute
Flows can create new topics and send data to them through the local message broker with DataHub nodes.
Create the Flow
- Add a new Flow. To create the topic and write to the topic: Connect an Inject node, and a DataHub Publish node.
-
To read from the topic: Connect a DataHub Subscribe node, and a debug node.
- Double-click the DataHub Publish node. Enter the name of the topic to create and write to.
- Double-click the DataHub Subscribe node. Enter the same topic name that you entered in Step 3.
-
Click the button on the left of the Inject node to create the topic and send a message to it. The Datahub subscribe node will send the message to the Debug tab.
-
You can check DataHub > Stats to view the new topic in the Topic List.