Message Queue Trigger
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
- Message Queue Trigger first subscribes to the topic defined by the user.
- Publisher, it can be a Fission function or external application, publishes messages to the subscribe topic.
- Trigger receives message from the message queue.
- Invoke function to get the response.
- (A) If it is 200 OK, the trigger publishes result to the response topic (if any).
- (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.