DATASOURCE::ROCKETMQ::Topics is used to query topics in Message Queue for Apache RocketMQ.

Syntax

{
  "Type": "DATASOURCE::ROCKETMQ::Topics",
  "Properties": {
    "InstanceId": String,
    "TopicName": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
InstanceIdStringNoYesThe ID of the instance that contains the topic. None.
TopicNameStringNoYesThe name of the topic. None.

Return values

Fn::GetAtt

  • Topics: details of the topics.
  • TopicNames: the names of the topics.
PropertyTypeDescriptionConstraint
TopicNamesListDetails of the topics. None.
TopicsListThe names of the topics. None.
RemarkstringThe description of the topic. None.
TagsMapThe tags that are added to the topic. Sample value:
[
            {
              "Key": "CartService",
              "Value": "SrviceA"
            }
          ]
InstanceIdstringThe ID of the instance that contains the topic. None.
RelationNamestringThe relationship between the current account and the topic. The following types of relationships are supported:
  • The current account is the owner of the topic.
  • The current account can subscribe to the topic.
  • The current account can publish messages to the topic.
  • The current account can publish messages to and subscribe to the topic.
MessageTypeNumberThe message type of the topic. Valid values:
  • 0: normal message
  • 1: partitionally ordered message
  • 2: globally ordered message
  • 4: transactional message
  • 5: scheduled or delayed messages
CreateTimestringThe time when the topic was created. None.
IndependentNamingbooleanIndicates whether a separate namespace is configured for the instance that contains the topic. Valid values:
  • true: A separate namespace is configured for the instance. The name of each resource must be unique in the instance. The names of resources in different instances can be the same.
  • false: No separate namespace is configured for the instance. The name of each resource must be globally unique among all instances.
RelationintegerThe code of the relationship between the current account and the topic. Valid values:
  • 1: The current account is the owner of the topic.
  • 2: The current account can publish messages to the topic.
  • 4: The current account can subscribe to the topic.
  • 6: The current account can publish messages to and subscribe to the topic.
OwnerstringThe ID of the topic owner. None.
TopicNamestringThe name of the topic. None.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::ROCKETMQ::Topics
        Properties:
          TopicName: DemoTopic
    Outputs:
      Topics:
        Description: The list of topics.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Topics
      TopicNames:
        Description: The list of topic names.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - TopicNames
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::ROCKETMQ::Topics",
          "Properties": {
            "TopicName": "DemoTopic"
          }
        }
      },
      "Outputs": {
        "Topics": {
          "Description": "The list of topics.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Topics"
            ]
          }
        },
        "TopicNames": {
          "Description": "The list of topic names.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "TopicNames"
            ]
          }
        }
      }
    }