KeySpaces
Kubemq keyspaces target connector allows services using kubemq server to access keyspaces database services.

Prerequisites

The following are required to run the keyspaces target connector:
  • kubemq cluster
  • IAM user keyspaces credentials
  • aws keyspaces server/cluster
  • kubemq-targets deployment

Configuration

keyspaces target connector configuration properties:
Properties Key
Required
Description
Example
hosts
yes
aws end point
"localhost"
port
yes
keyspaces port
"9142"
proto_version
no
keyspaces proto version
"4"
replication_factor
no
set replication factor
"1"
username
no
set keyspaces username
"keyspaces"
password
no
set keyspaces password
"keyspaces"
consistency
no
set keyspaces consistency
default_table
no
set table name
"test"
default_keyspace
no
set keyspace name
"test"
tls
yes
aws keyspace certificate
timeout_seconds
no
set default timeout seconds
"60"
connect_timeout_seconds
no
set default connect timeout seconds
"60"
Example:
1
bindings:
2
- name: kubemq-query-keyspaces
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-keyspaces-connector"
9
auth_token: ""
10
channel: "aws.query.keyspaces"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: aws.keyspaces
17
name: aws-keyspaces
18
properties:
19
hosts: "cassandra.us-east-2.amazonaws.com"
20
port: "9142"
21
username: "keyspaces"
22
password: "keyspaces"
23
proto_version: "4"
24
replication_factor: "1"
25
consistency: "LocalQuorum"
26
default_table: "test"
27
default_keyspace: "test"
28
tls: "https://www.amazontrust.com/repository/AmazonRootCA1.pem"
Copied!

Usage

Get Request

Get request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
keyspaces key string
any string
method
yes
get
"get"
consistency
yes
set consistency
"",strong","eventual"
table
yes
table name
"table
keyspace
yes
key space name
"keyspace"
Example:
1
{
2
"metadata": {
3
"key": "your-keyspaces-key",
4
"method": "get",
5
"consistency": "",
6
"table": "table",
7
"keyspace": "keyspace"
8
},
9
"data": null
10
}
Copied!

Set Request

Set request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
keyspaces key string
any string
method
yes
method name set
"set"
consistency
yes
set consistency
"",strong","eventual"
table
yes
table name
"table
keyspace
yes
key space name
"keyspace"
Set request data setting:
Data Key
Required
Description
Possible values
data
yes
data to set for the keyspaces key
base64 bytes array
Example:
1
{
2
"metadata": {
3
"key": "your-keyspaces-key",
4
"method": "set",
5
"consistency": "",
6
"table": "table",
7
"keyspace": "keyspace"
8
},
9
"data": "c29tZS1kYXRh"
10
}
Copied!

Delete Request

Delete request metadata setting:
Metadata Key
Required
Description
Possible values
key
yes
keyspaces key string
any string
method
yes
method name delete
"delete"
table
yes
table name
"table
keyspace
yes
key space name
"keyspace"
Example:
1
{
2
"metadata": {
3
"key": "your-keyspaces-key",
4
"method": "set",
5
"table": "table",
6
"keyspace": "keyspace"
7
},
8
"data": null
9
}
Copied!

Query Request

Query request metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
method name query
"query"
consistency
yes
set consistency
"",strong","eventual"
Query request data setting:
Data Key
Required
Description
Possible values
data
yes
query string
base64 bytes array
Example:
Query string: SELECT value FROM test.test WHERE key = 'some-key
1
{
2
"metadata": {
3
"method": "query",
4
"consistency": "strong"
5
},
6
"data": "U0VMRUNUIHZhbHVlIEZST00gdGVzdC50ZXN0IFdIRVJFIGtleSA9ICdzb21lLWtleQ=="
7
}
Copied!

Exec Request

Exec request metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
set type of request
"exec"
consistency
yes
set consistency
"",strong","eventual"
Exec request data setting:
Data Key
Required
Description
Possible values
data
yes
exec string
base64 bytes array
Example:
Exec string:
1
INSERT INTO test.test (key, value) VALUES ('some-key',textAsBlob('some-data'))
Copied!
1
{
2
"metadata": {
3
"method": "exec",
4
"consistency": "strong"
5
},
6
"data": "SU5TRVJUIElOVE8gdGVzdC50ZXN0IChrZXksIHZhbHVlKSBWQUxVRVMgKCdzb21lLWtleScsdGV4dEFzQmxvYignc29tZS1kYXRhJykp"
7
}
Copied!
Last modified 11mo ago