Pub/Sub
Kubemq gcp-pubsub target connector allows services using kubemq server to access google pubsub server.

Prerequisites

The following required to run the gcp-pubsub target connector:
  • kubemq cluster
  • gcp-pubsub set up
  • kubemq-source deployment

Configuration

pubsub target connector configuration properties:
Properties Key
Required
Description
Example
project_id
yes
gcp firestore project_id
"/myproject"
credentials
yes
gcp credentials files
"<google json credentials"
retries
no
number of sending retires
retries number
Example:
1
bindings:
2
- name: kubemq-query-gcp-pubsub
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-gcp-pubsub-connector"
9
auth_token: ""
10
channel: "query.gcp.pubsub"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: gcp.pubsub
17
name: gcp-pubsub
18
properties:
19
project_id: "projectID"
20
retries: "0"
21
credentials: 'json'
Copied!

Usage

Send Message

send a message to pub sub
Send Message metadata setting:
Metadata Key
Required
Description
Possible values
topicID
yes
the name of the topicID to sent to
valid topicID
tags
no
type of method
key value string
Example with tags:
1
{
2
"metadata": {
3
"topic_id": "my_topic",
4
"tags": "{\"tag-1\":\"test\",\"tag-2\":\"test2\"}"
5
},
6
"data": "c3RyaW5n"
7
}
Copied!
Example without tags:
1
{
2
"metadata": {
3
"topic_id": "my_topic"
4
},
5
"data": "c3RyaW5n"
6
}
Copied!
Last modified 11mo ago