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

Prerequisites

The following are required to run the memcached target connector:
  • kubemq cluster
  • memcached server
  • access to gcp Memcached server
  • kubemq-targets deployment

Configuration

Memcached target connector configuration properties:
Properties Key
Required
Description
Example
hosts
yes
memcached servers list address separated by comma
"localhost:11211,localhost:11212"
max_idle_connections
no
set max idle connection
"2"
default_timeout_seconds
no
set default timeout seconds for operation
"10"
Example:
1
bindings:
2
- name: kubemq-query-gcp-memcached
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-gcp-memcached-connector"
9
auth_token: ""
10
channel: "query.memcached"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: gcp.cache.memcached
17
name: gcp-memcached
18
properties:
19
hosts: "localhost:11211"
20
max_idle_connections: "2"
21
default_timeout_seconds: "10"
Copied!

Usage

Get Request

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

Set Request

Set request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
memcached key string
any string
method
yes
set
"set"
Set request data setting:
Data Key
Required
Description
Possible values
data
yes
data to set for the memcached key
base64 bytes array
Example:
1
{
2
"metadata": {
3
"key": "your-memcached-key",
4
"method": "set"
5
},
6
"data": "c29tZS1kYXRh"
7
}
Copied!

Delete Request

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