Managing source topics

After you add a topic to Event Endpoint Management, you can use the topic’s detail page to complete the following tasks:

  • Find out more about the topic.
  • Edit topic details.
  • Create a virtual topic from the source topic.
  • Manage the lifecycle state of virtual topics that use this source topic.
  • Remove a virtual topic from the catalog.

To access the topic details page:

  1. Log in to the Event Endpoint Management UI by using your login credentials.
  2. In the navigation pane, click Manage > Topics.
  3. Find the topic that you want to work with in the list, and click the name of the topic.

The details of your topic appear in three sections:

You can also delete your topic from this page, or import this source topic for use with IBM API Connect.

Editing a topic

Note: When a topic is created, you cannot edit the interaction type. For example, you cannot change it from a produce-enabled topic to a consume-enabled topic. You can set the interaction only when you add the source topic.

To edit topic details, complete the following steps:

  1. Click the Information tab on the topic page, and then select Edit Information.
  2. Edit the fields that you want to change in the Overview information pane.
  3. In the side bar, click Event Information to navigate to this pane.
  4. Edit the fields and values in the Event Information pane that you want to change.

Refer to the following sections for more information about the fields that can be edited in Overview information and Event Information.

Overview information

You can view and edit the following information in this pane. Restrictions and validation checks ensure that each field meets the requirements for Kafka source topics.

  • Name: The name of your source topic in Event Endpoint Management.
  • Kafka topic: The name of the Kafka topic on the Kafka cluster. You cannot edit this name.
  • Description: Free text description of your topic.
  • Tags: Comma-separated list of tags that you can use to make the topic easier to identify in the catalog. For example, Product,Refunds,Damage Returns.
  • Contact: Email address of the source topic owner.
  • Additonal contacts: Additional contact addresses for the source topic.

Event information

The event information provides details to help use the events from the topic.

  • Upload Schema: Provide an Avro schema in JavaScript Object Notation (JSON) format that describes the structure of the messages in your topic. If a valid schema is uploaded, a preview of the schema is displayed. When consuming events in a JSON, Avro binary, or an Avro JSON format from the topic, you can use a virtual topic that contains the schema filtering control to filter out any events that do not match the schema.

    You can also provide a schema in JSON format that describes the structure of the messages in your topic.

  • Schema description: Add detailed information about the schema.
  • Sample message: Provide an example of the messages that are emitted by the topic. This is useful when the sample messages do not follow a required format. You can provide a sample message instead of a schema.

Editing nested Avro schemas

When you share a topic from Event Streams that contains nested Avro schemas with custom record types, ensure that you replace the record type with the entire schema definition. You must do this after you add the source topic to Event Endpoint Management, but before you publish any virtual topics that are based on it. You can find the required schema definitions in your schema registry.

Before you begin

Before you edit a nested Avro schema in the Event Endpoint Management UI, obtain the required schema definition from your schema registry for each custom record type.

For example, if you are using the Event Streams schema registry, complete the following steps to obtain the required schema definition:

  1. Log in to the Event Streams UI by using your login credentials.
  2. Click Schema registry in the primary navigation.
  3. Select the schema for the record type from the list.
  4. Copy the schema definition and paste it into a text editor. When you edit the nested Avro schema later, you can replace the custom record type with this definition.

Editing a nested Avro schema

To edit a nested Avro schema in the Event Endpoint Management UI, follow these steps:

  1. Log in to the Event Endpoint Management UI by using your login credentials.
  2. In the navigation pane, click Manage > Topics.
  3. Click the name of the topic to edit.
  4. Click Edit information on the topic page.
  5. From the left pane, click Event information.
  6. To modify the schema, complete the following steps:

    a. Copy the schema that is displayed and paste it into a text editor.

    b. Copy the schema definition from your schema registry.

    For example, if you are using the Event Streams schema registry, copy the schema definition that you obtained earlier.

    c. Find the custom record type name and paste the schema definition in the type section.

    For example, in the following Avro schema, the customer type is replaced with its schema definition.

       {
         "type": "record",  
         "name": "order",
         "fields": [
            
             {
               "name": "region",
               "type": "string"
             },
             {
               "name": "customer",
               "type": "customer"
             }
         ] 
       } 
    
       {
         "type": "record",
         "name": "order",
         "fields": [
             {
               "name": "region",
               "type": "string"
             },
             {
               "name": "customer",
               "type": {
               "type": "record",
               "name": "customer",
               "fields": [
                   {
                     "name": "id",
                     "type": "string"
                   },
                   {
                     "name": "name",
                     "type": "string"
                   }
                ]
             }
           }
         ]
       }
    

    d. Save the modified schema as a .avsc or .avro file.

  7. Click Remove schema to delete the existing schema.
  8. To upload the modified schema, click Add an Avro or JSON schema and select the file that you modified and saved in step 6.

Adding source topic editors

If user groups are enabled, you can assign specific user groups to edit selected topics.

To assign user groups to enable members of the group to edit topics, complete the following steps:

  1. In the navigation pane, click Manage > Topics.
  2. Find the source topic that you want to work with and click the Collaborate icon Collaborate icon. The Manage topic editors pane is displayed with the user groups already assigned to the topic.
  3. Select a user group from the list displayed. If the group that you want is not displayed, click Enable user groups to add a group from your organization.

    Note: Any user groups that you enable must exist within the organization that is provided by your OAuth provider.

Deleting a source topic

A topic can be deleted from Event Endpoint Management only if it has no Published or Archived virtual topics. Deleting a source topic removes all the details about your topic.

To delete a topic from Event Endpoint Management, complete the following steps:

  1. In the navigation pane, click Manage > Topics.
  2. Find the topic that you want to delete and click the delete icon trash icon.