Queue
Kubemq queue target connector allows services using kubemq server to access queue messaging services.

Prerequisites

The following are required to run the queue target connector:
  • kubemq cluster
  • Azure active storage account
  • Azure active with storage enable - with access account
  • kubemq-targets deployment

Configuration

queue target connector configuration properties:
Properties Key
Required
Description
Example
storage_account
yes
azure storage account name
"my_account"
storage_access_key
yes
azure storage access key
"abcd1234"
policy
no
exponential or linear
"retry_policy_exponential",default(retry_policy_exponential)
max_tries
no
request max tries (1 disable)
"1",default(1)
try_timeout
no
Maximum time allowed for any single try
"3000",default(10000) milliseconds
retry_delay
no
Backoff amount for each retry
"1000",default(600) milliseconds
max_retry_delay
no
delay between retries
"1000",default(1800) milliseconds
Example:
1
bindings:
2
- name: kubemq-query-azure-queue
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-azure-queue-connector"
9
auth_token: ""
10
channel: "azure.storage.queue"
11
group: ""
12
concurrency: "1"
13
auto_reconnect: "true"
14
reconnect_interval_seconds: "1"
15
max_reconnects: "0"
16
target:
17
kind: azure.storage.queue
18
name: azure-storage-queue
19
properties:
20
storage_account: "id"
21
storage_access_key: "key".
22
max_retry_delay: "180000"
23
max_tries: "1"
24
policy: retry_policy_exponential
25
retry_delay: "60000"
26
try_timeout: "1000"
Copied!

Usage

Create

Create metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"create"
queue_name
yes
the name of the queue to create
"my_queue"
queue_metadata
no
key value string string queue Metadata
"{"tag":"test","name":"myname"}",default(none)
1
{
2
"metadata": {
3
"method": "create",
4
"queue_name": "my_queue",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": null
8
}
Copied!

Push

Push metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"push"
queue_name
yes
the name of the queue to send the message to
"my_queue"
queue_metadata
no
key value string string queue Metadata
"{"tag":"test","name":"myname"}",default(none)
visibility_timeout
no
visibility timeout value,in milliseconds
"2000000000",default(100000000)
time_to_live
no
maximum time to allow the message to be in the queue,in milliseconds
"2000000000",default(100000000)
Example:
1
{
2
"metadata": {
3
"method": "push",
4
"queue_name": "test",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": "bXktZmlsZS1kYXRh"
8
}
Copied!

Get Message Count

Get Message Count metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"get_messages_count"
service_url
yes
service url path and
queue_name
yes
the name of the queue
"my_queue"
Example:
1
{
2
"metadata": {
3
"method": "get_messages_count",
4
"queue_name": "test",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": null
8
}
Copied!

Delete

Delete metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete"
service_url
yes
service url path and
queue_name
yes
the name of the queue
"my_queue"
Example:
1
{
2
"metadata": {
3
"method": "delete",
4
"queue_name": "test",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": null
8
}
Copied!

Peek

Peek metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"peek"
file_name
yes
the name of the file to delete
"myfile.txt"
service_url
yes
service url path and
max_messages
no
max number of messages to receive int32
"10",default(32)
Example:
1
{
2
"metadata": {
3
"method": "peek",
4
"queue_name": "test",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": null
8
}
Copied!

Pop

Pop metadata setting:
Pop will remove the message
Metadata Key
Required
Description
Possible values
method
yes
type of method
"pop"
file_name
yes
the name of the file to delete
"myfile.txt"
service_url
yes
service url path and
max_messages
no
max number of messages to receive int32
"10",default(32)
Example:
1
{
2
"metadata": {
3
"method": "pop",
4
"queue_name": "test",
5
"service_url": "https://test.end.point.test.net"
6
},
7
"data": null
8
}
Copied!
Last modified 11mo ago