Add message queue trigger support (#218)

Adds support for message queue triggers based on the NATS-Streaming message queue.

This lets the user map a queue topic to a function, and optionally send the function's response into another queue topic.

The message queue trigger manager is designed to be message queue independent, so we should be able add support for more queues by adding implementations for the relatively simple mqtrigger.MessageQueue interface.
This commit is contained in:
Ta-Ching Chen
2017-07-05 17:19:58 -07:00
committed by Soam Vasani
parent 0fd60eab3b
commit e4fe007838
24 changed files with 1417 additions and 10 deletions
+14 -1
View File
@@ -95,6 +95,19 @@ While a few simple retries are done, there isn't yet a reliable
message bus between Kubewatcher and the function. Work for this is
tracked in issue #64.
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.
Here's a diagram of the components:
![Message queue trigger Diagram](https://user-images.githubusercontent.com/202578/27012344-9457cb24-4f00-11e7-8d6b-926ff01637b3.jpg)
Environment Container
---------------------
@@ -113,7 +126,7 @@ volume shared between fetcher and this environment container. Poolmgr
then requests the container to load the function.
Logger
-----------
------
Logger helps to forward function logs to centralized db service for log
persistence. Currently only influxdb is supported to store logs.