All Products
Search
Document Center

Function Compute:RunOptions

Last Updated:Nov 06, 2024
ParameterTypeDescriptionExample
object

The runtime configurations of the EventBridge-based trigger.

batchWindowBatchWindow

The batch window configurations.

deadLetterQueueDeadLetterQueue

Whether to enable dead-letter queues. If you configure this parameter, dead-letter queues are enabled. By default, dead-letter queues are not enabled and messages are discarded when the retry policy is exhausted. Queues of Simple Message Queue (formerly MNS), ApsaraMQ for RocketMQ, and ApsaraMQ for Kafka, and EventBridge event buses can be used as dead-letter queues.

errorsTolerancestring

The fault tolerance policy. Valid values:

  • NONE: does not tolerate exceptions.
  • ALL: tolerates all exceptions.
Note The default value is NONE.
ALL
modestring

The underlying application mode when message data is pushed to Function Compute. Valid values:

  • event-streaming: the event streaming mode. In this mode, events are pushed in arrays. One or more message events are pushed to the function in batches based on your push configurations. This mode is suitable for end-to-end streaming data processing scenarios. The event streaming mode supports the following event sources: Simple Message Queue (formerly MNS), ApsaraMQ for RocketMQ, ApsaraMQ for RabbitMQ, ApsaraMQ for Kafka, ApsaraMQ for MQTT, and Data Transmission Service (DTS).
  • event-driven: the event mode. In event mode, a single message is passed to the function as event parameters at a time. Events follow the CloudEvents specifications. The event mode supports the following event sources: Default, Simple Message Queue (formerly MNS), ApsaraMQ for RocketMQ, and ApsaraMQ for RabbitMQ. In this mode, batch configurations are not supported.
event-streaming
retryStrategyRetryStrategy

The retry policy that you want to use if events fail to be pushed.