How to use IBM App Connect with Redis

Redis (REmote DIctionary Server) is an open source data store, which holds data in memory and functions as a database, cache, and message broker.

As a NoSQL database, Redis stores key/value pairs in data structures (such as string, hash, and list data types) rather than within tables and other database objects, which are used by SQL-based relational databases. Redis also provides a set of commands that can be used to execute operations on the Redis server (for example, SET and GET) in much the same way as SQL-based statements such as INSERT or SELECT.

  • A connector in IBM App Connect on IBM CloudCloud-managed connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release)
  • A local connector in a Designer instance of IBM App Connect in containers (Extended Update Support)Local connector in containers (Extended User Support release)
  • A local connector in a Designer instance of IBM App Connect in containers (Long Term Support)Local connector in containers (Long Term Support release)
The following information describes how to use IBM® App Connect to connect Redis to your other applications.

Connecting to Redis

To connect App Connect to an Redis account that you want App Connect to use, you need the following connection details, which should be available from your instance. For example, if using IBM Cloud® Databases for Redis, you can obtain the connection values from the Connections panel and Service Credentials panel of your service instance in IBM Cloud.

  • Redis host name or IP address: Specify the host name or IP address of the Redis server.
  • Redis port number: Specify the port number of the Redis server.
  • Password: Specify the password required for authentication.
  • Database number: Optionally specify the database index of the database to connect to, typically from a range of 0 to 15. (The index is generally shown at the end of a Redis URL.) The default is 0.
  • Allow certificate validation: Set to true or false to indicate whether the database is secured using TLS authentication and encryption. If set to true, you'll need to provide an SSL or a TSL certificate to validate against the root certificate from the certificate authority (CA). The default is true.
  • Certificate: If Allow certificate validation is set to true, a certificate is mandatory. Specify the contents of the CA signed certificate for the cluster that hosts the database, in Base64 format. You can copy and paste the Base64-encoded contents directly from your instance.
  • Connection details form for Redis

To connect to Redis from the App Connect Designer Catalog page for the first time, under Redis click Connect. This creates an account in App Connect. For more information about ways to connect to Redis, see Managing accounts in App Connect.


Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.

What should I consider first?

Before you use App Connect Designer with Redis, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment (IBM Cloud Pak for Integration or App Connect on IBM Cloud) and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.
  • App Connect supports the following cloud-hosted Redis deployments:
  • App Connect supports the following Redis data structures, which are exposed as objects:
    • Hashes
    • Keys
    • Lists
    • Sets
    • Sorted Sets
    • Strings
  • App Connect also supports a subset of Redis commands, which are exposed as actions. You can see which Redis commands are supported by expanding the list of objects on the Applications tab. For example, the following commands are supported for hashes:
    Figure 1. Redis actions available for Hashes
    Redis actions available for Hashes

Events and actions

Redis events

These events are for changes in this application that trigger a flow to start performing the actions in the flow.

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

Redis actions

These are actions on this application that you want a flow to complete.

Update or create hash
Check hash field presence
Get hash field count
Get hash field value
Delete key
Check key presence
Get data type of key
Set expiry timeout of key (seconds/milliseconds)
Set expire-at time of key
Get time to live of key (seconds/milliseconds)
Remove expiry timeout from key
Rename key
Update or create list
Update list
Get list length
Trim list
Update or create set
Check set member presence
Get set member count
Sorted sets
Update or create sorted set
Get sorted set member count
Get sorted set member count by score range
Get sorted set member rank
Get sorted set member score
Update or create string
Append value to string
Get value of string