Message Queue Trigger

Subscribe topics and invoke functions

A message queue trigger binds a message queue topic to a function:

Events from that topic cause the function to be invoked with the message as the body of the request. The trigger may also contain a response topic: if specified, the function’s output is sent to this response.

Fig.1 Message Queue Trigger

Fig.1 Message Queue Trigger

  1. Message Queue Trigger first subscribes to the topic defined by the user.
  2. Publisher, it can be a Fission function or external application, publishes messages to the subscribe topic.
  3. Trigger receives message from the message queue.
  4. Invoke function to get the response.
  5. (A) If it is 200 OK, the trigger publishes result to the response topic (if any).
  6. (B) If there is any error or the state is not equal to 200 OK, the trigger publishes result to the error topic (if any).
    Currently, only NATS, Kafka message queue and Redis List triggers support error topic.
Last modified December 16, 2021: Fixed Link/Document changes (#121) (8795548)