Tags

Add Tags

Within the Kafka Connector, tags that are contained within the Connector Topic refer to individual Kafka topics that share the settings defined for the connector topic.

Note that “Generic” (producer) topics are not expected to contain any tags because Kafka topic names are automatically generated within Tasks based on the connected tags.

To add tags, and therefore Kafka topics, to a connector topic, select a connector topic in the navigation tree and press the “Add” toolbar button.

../_images/kafka-add-client-tags.png

In the dialog, enter one or more Kafka topics in separate lines.

../_images/kafka-add-client-tags-dlg.png

Click the “Add” button in the dialog to add the defined Kafka topics as tags to the connector topic.

Alternatively, you can use the tag browser to connect to the Kafka broker and query available topics. The tag browser will subscribe to the given root topic, wait for Kafka messages to arrive, and present the messsage topics in hierarchical form. Enter a root topic ending with ‘*’ as a wild card to capture all matching Kafka topics. Start the root topic name with ‘^’ to use regular expressions.

If Kafka topics contain JSON payloads then you may optionally want to check the “Decode JSON” option. This will inspect JSON payloads and make values within JSON objects available as individual tags.

Select one or more tags to drag onto the topic panel to add these tags (Kafka topics) to the connector topic.

../_images/kafka-drag-tags.png

Expand the “JSON” header at the bottom of the tag browser panel to view the JSON payload associated with a tag browser tag.

Note

The tag browser can only display topics that are active (new messages are being sent). If messages are sent infrequently then it may take a little while for the tag browser to populate the tree view. Note also that the load of the Kafka broker may increase if many Kafka topics are captured by a root topic using wildcards or regular expressions.

Tag Settings

Select a tag in the content panel to modify its settings.

../_images/kafka-tag-settings.png
  • Name
    Choose a name for the tag. By default, this will be the same as the Kafka topic name.
  • Kafka Topic
    The Kafka topic is the “address” of the tag within the Kafka broker.
  • JSON path
    If the Kafka topic value contains a JSON object then you may optionally enter a path to a value within the JSON object to retrieve individual values. The JSON path maybe, for example, the name of a property within the JSON object. Tags with empty JSON paths refer to the entire message or JSON object.

Remove Tags

To remove tags from a topic, select tags within the topic’s content panel, then press the toolbar’s “Remove” button to remove selected tags.

../_images/kafka-remove-client-tags.png

Warning

Note that the tags are also removed from any task using the tags.