Updated on 2023-11-10 GMT+08:00

Creating a Topic

Overview

Create a topic for storing messages so that producers can publish messages and consumers can subscribe to messages in it.

Prerequisites

Each topic must belong to an integration application. Before creating a topic, ensure that an integration application is available. Otherwise, create an integration application first.

Procedure

  1. Log in to the ROMA Connect console. On the Instances page, click View Console of an instance.
  2. In the navigation pane, choose Message Queue Service > Topic Management. On the page displayed, click Create Topic in the upper right corner.
  3. In the dialog box displayed, configure topic information and click OK.
    Table 1 Parameters for creating a topic

    Parameter

    Description

    Topic Name

    Enter a topic name. Using naming rules facilitates future search.

    NOTE:

    Periods (.) and underscores (_) cannot be used to distinguish names. For example, if you create a topic named Topic.test first, you cannot create another topic named Topic_test.

    Integration Application

    Select the integration application to which the topic belongs.

    Permission

    Select the permission on a topic for the integration application to which the topic belongs.

    • Publish/Subscribe: Messages can be published to and subscribed from the topic.
    • Publish: Messages can only be published to the topic.
    • Subscribe: Messages can be subscribed only in the topic.

    Partitions

    Set the number of partitions of a topic to improve the concurrent performance of message production and consumption.

    If this parameter is set to 1, messages will be consumed in the FIFO order.

    Replicas

    Set the number of replicas of a topic. ROMA Connect automatically backs up data on each replica. If one replica is faulty, data will still be available. The reliability increases with the number of replicas of a topic.

    NOTE:

    If a broker is faulty, an internal error will occur when you query messages using a topic with only one replica. Use topics with more than one replica instead.

    Aging Time (h)

    Set the aging time of messages stored in the topic. Messages that exceed the aging time will be deleted.

    Synchronous Replication

    When a client creates a message to a topic, ROMA Connect determines whether to replicate the message to all replicas and then returns a response to the client.

    After synchronous replication is enabled, you also need to set acks to -1 on the client. Otherwise, synchronous replication will not take effect.

    Synchronous Flushing

    This parameter specifies whether each message created by a client to the topic is immediately written to the disk. When synchronous flushing is enabled, the reliability is enhanced.

    Tag Name

    Add message publishing and subscription tags for the integration application to which a topic belongs. Generally, you do not need to add the tags. The tags are used only in special service scenarios.

    After a tag is added, the client needs to transmit the tag information when publishing and subscribing to messages in the topic. If there are multiple tags, the tags transmitted by the client must be a subset of the tags contained in the topic.

    Filter

    Enter values to block the display of messages containing these values.

    Description

    Enter a brief description of the topic.