Huawei Publish

Huawei Publish

Certified

Publish messages to a Huawei DMS for RocketMQ topic

Reads messages from from and sends them to the configured topic using the Apache RocketMQ protocol. Supports STRING and JSON serializers for the message body. Each input map may contain body, tags, and keys. Sends are synchronous — the task only completes once all messages have been acknowledged by the broker.

yaml
type: io.kestra.plugin.huawei.dms.rocketmq.Publish
yaml
id: dms_rocketmq_publish
namespace: company.team

tasks:
  - id: publish
    type: io.kestra.plugin.huawei.dms.rocketmq.Publish
    accessKeyId: "{{ secret('HUAWEI_AK') }}"
    secretAccessKey: "{{ secret('HUAWEI_SK') }}"
    nameServerAddr: "dms-instance-id.rocketmq.eu-west-101.myhuaweicloud.com:8100"
    topic: my-topic
    groupId: kestra-producer-group
    from:
      body: "Hello from Kestra!"
      tags: "order"

Publish JSON messages

yaml
id: dms_rocketmq_publish_json
namespace: company.team

tasks:
  - id: publish
    type: io.kestra.plugin.huawei.dms.rocketmq.Publish
    accessKeyId: "{{ secret('HUAWEI_AK') }}"
    secretAccessKey: "{{ secret('HUAWEI_SK') }}"
    nameServerAddr: "dms-instance-id.rocketmq.eu-west-101.myhuaweicloud.com:8100"
    topic: orders
    groupId: kestra-producer-group
    serdeType: JSON
    from:
      body:
        orderId: "order-123"
        amount: 99.99
      tags: "order"
Properties

Messages to publish

A single map, a list of maps, or a URI pointing to an ION file in Kestra internal storage. Each map may contain: body (required), tags, and keys.

Consumer or producer group ID

Consumer group name for Consume/Trigger tasks; producer group name for Publish tasks.

Name server address

Address of the RocketMQ name server, e.g. dms-host: 8100. For DMS for RocketMQ, copy the name server address from the instance detail page in the Huawei Cloud console.

Topic to publish to or consume from

Access Key (AK) used to authenticate with Huawei Cloud

Huawei Cloud access key used together with secretAccessKey to sign API requests. Required for AK/SK-based authentication; not required when providing a pre-obtained securityToken. Sensitive — always provide via {{ secret('NAME') }}.

Huawei Cloud Account Domain ID

Identifies the Huawei Cloud account (domain). Required when authenticating against global services such as IAM, or when requesting a domain-scoped IAM token.

DMS instance ID

Huawei Cloud DMS for RocketMQ instance ID. Required when the instance uses instance isolation. Leave empty for shared DMS instances.

Reference (ref) of the pluginDefaults to apply to this task.

Huawei Cloud Project ID

Identifies the region-scoped project against which most regional services authenticate. Mutually exclusive with domainId for global services such as IAM.

Huawei Cloud region

Region identifier such as eu-west-101, ap-southeast-1, or cn-north-4.

Secret Key (SK) used to authenticate with Huawei Cloud

Huawei Cloud secret key paired with accessKeyId. Required for AK/SK-based authentication. Sensitive — always provide via {{ secret('NAME') }}.

Pre-obtained Huawei Cloud IAM token used as bearer credential for downstream API calls

When set, downstream Huawei tasks send this value in the X-Auth-Token header instead of signing requests with AK/SK. Sensitive.

DefaultSTRING
Possible Values
STRINGJSON

Message body serializer/deserializer

STRING (default) or JSON.

Default*

Tag filter expression

Server-side filter applied by the broker. Use * (default) to receive all tags, or a specific tag to filter messages.

Inline IAM credential exchange

When set, the connection layer calls the Huawei IAM STS API once per task execution and uses the returned temporary AK/SK + security token instead of the static accessKeyId and secretAccessKey properties.

Configure once via pluginDefaults to apply transparently to every task in a namespace without per-task credential wiring:

pluginDefaults: 
  - type: io.kestra.plugin.huawei.obs
    values: 
      region: eu-west-101
      temporaryCredentials: 
        authMethod: PASSWORD
        username: my-iam-user
        password: "{{ secret('HUAWEI_IAM_PASSWORD') }}"
        domainName: my-account-domain
        durationSeconds: 3600

**Long-running tasks: ** the exchange runs once at execution start. For RealtimeTrigger or long-running Consume tasks that outlive durationSeconds, credentials will expire mid-run. Use long-lived AK/SK properties or refresh externally in that case.

Definitions
authMethodstring
DefaultPASSWORD
Possible Values
PASSWORDTOKEN

Authentication method

Controls which credentials are used to obtain the session token before exchanging for temporary STS credentials.

  • PASSWORD (default): provide username, password, and domainName.
  • TOKEN: provide an existing iamToken (X-Auth-Token).
domainNamestring

Account domain name (PASSWORD method only)

The Huawei Cloud account name (domain name) that owns the IAM user. Required when authMethod is PASSWORD. Visible in the Huawei Cloud console under My Credentials → Domain Name.

durationSecondsintegerstring
Default900

Lifetime of the temporary credentials in seconds

How long the returned temporary AK/SK/security-token should remain valid. Huawei Cloud accepts values between 900 (15 minutes) and 86400 (24 hours). Defaults to 900 seconds.

endpointSuffixstring
Defaultmyhuaweicloud.com

Huawei Cloud IAM endpoint suffix

Domain suffix used to build the IAM endpoint URL when no explicit endpoint override is set. Defaults to myhuaweicloud.com. Set to myhuaweicloud.eu for the European sovereign cloud (region eu-west-101 / EU-Dublin).

iamTokenstring

IAM token to exchange (TOKEN method only)

An existing Huawei Cloud X-Auth-Token to exchange for temporary STS credentials. Required when authMethod is TOKEN. Sensitive — always provide via {{ secret('NAME') }}.

passwordstring

IAM password (PASSWORD method only)

Password for the IAM user identified by username. Required when authMethod is PASSWORD. Sensitive — always provide via {{ secret('NAME') }}.

projectNamestring

Project name for project-scoped tokens (PASSWORD method only)

Overrides the project name used for scope=PROJECT token requests. Defaults to the task's region value when omitted, which is correct for most regions.

scopestring
DefaultPROJECT
Possible Values
PROJECTDOMAIN

Token scope (PASSWORD method only)

Scope of the session token obtained during password authentication.

  • PROJECT (default): token is scoped to the project matching projectName (or the task's region when projectName is omitted). Use for most downstream tasks.
  • DOMAIN: token is scoped to the domain.
usernamestring

IAM username (PASSWORD method only)

Huawei Cloud IAM username. Required when authMethod is PASSWORD.

Number of messages successfully published to the DMS RocketMQ topic

Unitmessages

Number of messages published to the DMS RocketMQ topic.