Alibaba Cloud Publish

Alibaba Cloud Publish

Certified

Publish messages to an MNS queue

Sends one or more messages to an Alibaba Cloud Message Service (MNS) queue, in batches of 16. Messages come from an inline list or a kestra:// ION file.

yaml
type: io.kestra.plugin.alibaba.mns.Publish

Publish a message to a queue

yaml
id: mns_publish
namespace: company.team

tasks:
  - id: publish
    type: io.kestra.plugin.alibaba.mns.Publish
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-hangzhou
    accountId: "{{ secret('ALIBABA_ACCOUNT_ID') }}"
    queue: orders
    from:
      - data: '{"orderId": 42}'
      - data:
          orderId: 43
        delaySeconds: 60

Publish every row of an internal storage file

yaml
id: mns_publish_file
namespace: company.team

inputs:
  - id: file
    type: FILE
    description: An ION file with one `data` field per row

tasks:
  - id: publish
    type: io.kestra.plugin.alibaba.mns.Publish
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-hangzhou
    accountId: "{{ secret('ALIBABA_ACCOUNT_ID') }}"
    queue: orders
    from: "{{ inputs.file }}"
Properties

AccessKey ID

The AccessKey ID used to authenticate against Alibaba Cloud.

AccessKey secret

The AccessKey secret paired with the AccessKey ID.

Structured data items, either as a map, a list of map, a URI, or a JSON string.

Structured data items can be defined in the following ways:

  • A single item as a map (a document).
  • A list of items as a list of maps (a list of documents).
  • A URI, supported schemes are kestra for internal storage files, file for host local files, and nsfile for namespace files.
  • A JSON String that will then be serialized either as a single item or a list of items.
Definitions
data*object

The message data

A string or a structured value (map, list) serialized to JSON before sending. Inline messages are rendered once by Kestra, rows read from a kestra:// file are sent as is.

delaySecondsinteger

Delay in seconds

How long the message stays invisible after it is sent, from 0 to 604800 seconds.

priorityinteger

Priority

From 1 (highest) to 16 (lowest), defaults to 8.

Queue

The name of the MNS queue.

Account ID

The Alibaba Cloud account ID, used to derive the default endpoint https://<accountId>.mns.<region>.aliyuncs.com. Not needed when endpointOverride is set.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Endpoint override

Custom http or https endpoint URL. When set, it takes precedence over the endpoint derived from region.

Region

The Alibaba Cloud region ID, for example cn-hangzhou. The service endpoint is derived from it unless endpointOverride is set.

Security token

Optional Security Token Service (STS) token, required when using temporary credentials.

Number of messages published

Unitmessages

Number of messages published to the MNS queue.