Redis adapter as a source
The adapter can be specified as a data source for input cards in maps, and for source nodes in flows. All Redis commands are non-blocking except for SUBSCRIBE, PSUBSCRIBE, BLPOP, and BRPOP. For these commands, a time out can be specified.
The adapter can also be configured to act as a watch for the source nodes in flows. This is supported for SUBSCRIBE, PSUBSCRIBE, BLPOP, and BRPOP commands. The adapter is utilized from the listener service and executes the selected command. Once data is available on the channel, or in the list (If BLPOP or BRPOP are called) the adapter captures the messages and reports them as events which in turn are used to trigger instances of the flow in which the watch is defined. When an instance of the flow runs, the input node in the flow on which the watch is defined operates on the data collected from the event that triggered that flow instance, without a need to connect to the broker again.
For commands that return structured data, such as hashes, sets, and sorted sets, the data can either be returned in delimited form, or as JSON. This is determined by the setting of the JSON property.
Some commands both require data and return data. There are several ways to call such commands:
-
Invoke the adapter from a request node in a flow.
-
Invoke the adapter from a GET map function, providing the request data as the third argument.