Group operations

更新时间:
复制 MD 格式

A group is a collection of topics. You can subscribe to all topics in a group at once. This feature is provided primarily for compatibility with the Kafka protocol.

DataHub provides the group feature to support Kafka-style subscriptions to multiple topics. You can create a group in a project and add the topics to which you want to subscribe. Then, you can use this group to subscribe to all of them at once. On the subscription list page for a topic, you can view the subscription that is automatically created by the group. If you delete this subscription, the group can no longer subscribe to that topic, and all previous checkpoints are also deleted.

Limits:

A single group can subscribe to a maximum of 50 topics.

Create a Group

1. On the Project details page, click New Group.

2. Enter the required information. Select the topics to which you want to subscribe and add them to the list on the right. Click Create.

p379231

3. After the group is created, a subscription is automatically created for each corresponding topic, as shown in the following figure.

8

For information about how to create a group using the SDK, see Java SDK.

Modify a Group

You can add topics to or remove topics from a group.

  1. Click Edit.

2. To remove a topic, select it from the list on the right and move it to the list on the left, as shown in the following figure. This action also deletes the subscription that was automatically created for the topic.

33. To add a topic, select it from the list on the left and move it to the list on the right, as shown in the following figure.

4

Delete a Group

Select the group that you want to delete and click Delete. When you delete a group, all subscriptions that were automatically created by the group are also deleted.

If the subscriptions that were created by the group are not automatically deleted, you must delete them manually.