Basic settings |
Trigger Type |
Select MNS Triggered by Queue.
|
MNS |
Name |
Enter a custom trigger name |
mns-trigger |
Version or Alias |
The default value is LATEST. If you want to create a trigger for another version or alias, switch to the trigger
of the specified version or alias in the upper-right corner of the function details
page. For more information about versions and aliases of a service, see Manage versions and Manage aliases.
|
LATEST |
Queue Name |
Select a MNS queue.
|
MyQueue |
Advanced settings |
Invocation Method |
Select a function invocation method.
Valid values:
- Synchronous Invocation: After an event triggers the execution of a function, Function Compute returns the result after the execution is complete. This is the default value. For
more information, see Synchronous invocations.
- Asynchronous Invocation: After an event triggers the execution of a function, Function Compute immediately returns a response and ensures that the function is successfully executed
at least once. However, the detailed execution result is not returned. This invocation
method is suitable for functions that have relatively higher scheduling latency. For
more information, see Overview.
|
Synchronous Invocation |
Message Push Model |
The underlying application model that is used for pushing message data to Function Compute.
Valid values:
- Event Model: A single message is passed to the function as an event parameter. The event follows
the CloudEvents specification. For information about the relationship between the
message content and CloudEvents, see Step 2: Configure the input parameters of the function.
- Event Stream Model: One or more messages are pushed to Function Compute for batch processing based on
your batch configuration. This model is suitable for scenarios in which end-to-end
streaming data is processed.
|
Event Model |
Batch Push |
This parameter is available only when you set Message Push Model to Event Stream Model.
The batch push feature helps you aggregate multiple events at a time. This feature
is triggered when one of the conditions that are specified in the Batch Push Messages and Batch Push Interval parameters is met.
For example, you set Batch Push Messages to 100 and Batch Push Interval to 15 seconds.
If the number of messages reaches 100 in 10 seconds, batch push is triggered immediately
instead of 5 seconds later.
|
Enable |
Batch Push Messages |
The maximum number of messages that are sent for each function invocation. Requests
are sent only when the number of messages in the backlog reaches the specified value.
Valid values: 1 to 500.
|
1 |
Batch Push Interval |
The time interval at which the function is invoked. The system sends the aggregated
messages to Function Compute at the specified time interval. Valid values: 0 to 15.
Unit: seconds. A value of 0 indicates that messages are sent immediately after they
are aggregated.
|
1 |
Retry Policy |
This parameter is available only when you set Message Push Model to Event Stream Model.
The retry policy that is used when a message fails to be pushed.
Valid values:
- Backoff Retry: A message can be retried up to three times. The interval between two consecutive
retries is a random value between 10 and 20 seconds.
- Exponential Decay Retry: The message can be retried 176 times. The interval between two consecutive retries
increases exponentially to 512 seconds, and the total retry time is 1 day. The specific
retry intervals are 1, 2, 4, 8, 16, 32, 64, 128, 256, and 512 seconds.
|
Backoff Retry |
Fault Tolerance Policy |
This parameter is available only when you set Message Push Model to Event Stream Model.
The method that is used to handle errors.
Valid values:
- Fault Tolerance Allowed: Fault tolerance is allowed. If an exception occurs, the event processing is not
blocked. If the number of retries for a message exceeds the number of retries that
is specified in the retry policy, the message is delivered to the dead-letter queue
or discarded based on your configurations.
- Fault Tolerance Prohibited: Fault tolerance is not allowed. If an exception occurs or the number of retries
for a message exceeds the number of retries that is specified in the retry policy,
the event processing is blocked.
|
Fault Tolerance Allowed |
Dead-letter Queue |
This parameter is available only when you set Message Push Model to Event Stream Model.
The queue to which the messages that are not processed or the messages whose number
of retries exceeds the number of retries specified in the retry policy can be sent.
If this feature is not enabled, the messages whose number of retries exceeds the number
of retries that is specified in the retry policy are discarded.
|
Enable |
Queue Type |
The type of the dead-letter queue.
Valid values:
- MNS
- Message Queue for Apache RocketMQ
|
MNS |
Queue Name |
The name of the dead-letter queue. |
test-queue |