Redis
Kubemq redis target connector allows services using kubemq server to access redis server functions such set, get and delete.

Prerequisites

The following are required to run the redis target connector:
  • kubemq cluster
  • redis v5.0.0 (or later)
  • access to gcp redis server
  • kubemq-targets deployment

Configuration

Redis target connector configuration properties:
Properties Key
Required
Description
Example
url
yes
redis connection string
"redis://localhost:6379"
Example:
1
bindings:
2
- name: kubemq-query-redis
3
source:
4
kind: kubemq.kubemq.query
5
name: kubemq-query
6
properties:
7
host: "localhost"
8
port: "50000"
9
client_id: "kubemq-query-redis-connector"
10
auth_token: ""
11
channel: "query.redis"
12
group: ""
13
concurrency: "1"
14
auto_reconnect: "true"
15
reconnect_interval_seconds: "1"
16
max_reconnects: "0"
17
target:
18
kind: gcp.cache.redis
19
name: target-redis
20
properties:
21
url: "redis://localhost:6379"
Copied!

Usage

Get Request

Get request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
redis key string
any string
method
yes
get
"get"
Example:
1
{
2
"metadata": {
3
"key": "your-redis-key",
4
"method": "get"
5
},
6
"data": null
7
}
Copied!

Set Request

Set request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
redis key string
any string
method
yes
set
"set"
etag
no
set etag version
"0"
concurrency
no
set concurrency
""
"first-write"
"last-write"
consistency
no
set consistency
""
"strong"
"eventual"
Set request data setting:
Data Key
Required
Description
Possible values
data
yes
data to set for the redis key
base64 bytes array
Example:
1
{
2
"metadata": {
3
"key": "your-redis-key",
4
"method": "set",
5
"etag": "0",
6
"concurrency": "",
7
"consistency": ""
8
},
9
"data": "c29tZS1kYXRh"
10
}
Copied!

Delete Request

Delete request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
redis key string
any string
method
yes
delete
"delete"
Example:
1
{
2
"metadata": {
3
"key": "your-redis-key",
4
"method": "delete"
5
},
6
"data": null
7
}
Copied!
Last modified 11mo ago