Skip to main content

Consumer

Consumer allows your application to listen to message queues sent through the Queue API.

Manifest Definition

modules:
consumer:
- key: queue-consumer
# Name of the queue for which this consumer will be invoked
queue: queue-name
# Optional, whether the queue is globally unique (i.e., can be accessed across applications), default is false
global: false
# Optional, transform the message body data
messageTransformer:
tenant: $.tenant
payload:
name: $.name
batchSize: 1
maxRetries: 5
resolver:
function: consumer-function
method: event-listener
function:
- key: consumer-function
handler: consumer.handler

Parameter Explanation

  • global: Whether the queue is globally unique (i.e., can be accessed across applications), default is false.
  • messageTransformer: Used to transform message data, requires tenant field and payload field.
  • batchSize: Number of tasks processed in parallel, default is 1.
  • maxRetries: Maximum number of retries on failure, default is 5.
  • resolver: The function in resolver points to the corresponding key in the function module, and the method in resolver corresponds to the method defined in the execution function. Refer to resolver.

Contact us

Mail:

client@oschina.cn

Mobile:

+86 133-5294-7997

+86 136-7025-2304

+86 181-2418-5312

+86 185-0387-0265

Address:

22nd Floor, Cloud Technology Building, Xili Street, Nanshan District, Shenzhen

5th floor, Shoukai Plaza, Huilongguan East Avenue, Changping District, Beijing

Consultant

image

Follow Us

English
Copyright ©2025 北京奥思研工智能科技有限公司京ICP备2025119063号