Updated on 2022-02-21 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 next to a specific 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. It is recommended that you enter a name based on naming rules to facilitate search.

    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 only subscribed from 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.

    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.

    Sensitive Fields

    Enter sensitive fields to messages in a topic. If a message sent to the topic contains sensitive fields, the sensitive fields will be shielded.

    Description

    Enter a brief description of the topic.