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

  1. Add a new Flow. To create the topic and write to the topic: Connect an Inject node, and a DataHub Publish node.
  2. To read from the topic: Connect a DataHub Subscribe node, and a debug node.

  3. Double-click the DataHub Publish node. Enter the name of the topic to create and write to.
  4. Double-click the DataHub Subscribe node. Enter the same topic name that you entered in Step 3.
  5. 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.

  6. You can check DataHub > Stats to view the new topic in the Topic List.