Redis

Most recent version: v1.1.0

See the changelog of this Action type here.

Overview

Redis is a powerful in-memory data structure store that can be used as a database, cache, and message broker. It provides high performance, scalability, and versatility, making it a popular choice for real-time applications and data processing.

The Redis Action allows users to set and retrieve data from a Redis server.

Ports

These are the input and output ports of this Action:

Input ports
  • Default port - All the events to be processed by this Action enter through this port.

Output ports
  • Default port - Events are sent through this port if no error occurs while processing them.

  • Error port - Events are sent through this port if an error occurs while processing them.

Installing Redis

To use this Action, you must install Redis and Redis CLI.

As installing Redis via a Docker is generally preferable, we will brief you on this procedure. To install it locally, check this article.

1

Start your local Redis Docker instance:

FROM redis:latest

EXPOSE 6379

CMD ["redis-server"]

## build

docker build -t my-redis-image

## run

docker run -d --name my-redis my-redis-image
2

Now, connect to the Redis container:

docker exec -it {{ContainerID}} sh

> redis-cli
3

Use this command to get the IP:

# Read Value

127.0.0.1:6379> GET key

# Set Value

SET key value
4

Paste this IP in the Redis endpoint field of your Redis Action.

For more help and in-depth detail, see these use cases.

Configuration

1

Find Redis in the Actions tab (under the Advanced group) and drag it onto the canvas. Link it to the required Listener and Data sink.

2

To open the configuration, click the Action in the canvas and select Configuration.

3

Enter the required parameters:

Parameter
Description

Redis endpoint*

Enter the endpoint used to establish the connection to the Redis server.

Read Timeout*

Enter the maximum amount of milliseconds to wait to receive data after the connection has been established and the request has been sent.

Write Timeout*

Enter the maximum amount of milliseconds to wait while trying to send data to the server.

Commands*

The command to read or write data from the Redis server.

  • SET

    • Redis Key*- If the model has a version, enter it here. Choose the input field that contains it.

    • Event in field* - Choose the field that contains the events you want to input to Redis.

    • Expiration - Optionally, enter how long the key will be available in the Redis server. The minimum value is 0.

  • HSET

    • Redis Key*- If the model has a version, enter it here. Choose the input field that contains it.

    • Field/Value pairs - Add as many fields and pipeline values as required.

  • GET

    • Redis Key*- If the model has a version, enter it here. Choose the input field that contains it.

    • Event out field* - Enter a name for the output field that will store the output data.

  • HGET

    • Redis Key*- If the model has a version, enter it here. Choose the input field that contains it.

    • Event out field* - Enter a name for the output field that will store the output data.

    • HGET field* - Select the field from the Listener or Action that serves as the HGET field.

4

Click Save to complete.

Last updated

Was this helpful?