Kafka Broker Bridge Settings

Supported parameters

All parameters explained below should be prefixed by broker_bridge.kafka e.g. broker_bridge.kafka.enabled.

Key

Accepts

Default

enabled

clients.<name>.allow_topic_auto_creation

off

clients.<name>.auto_start_producers

on

clients.<name>.endpoints

[ {IPString, PortNumber} ] e.g.[{"127.0.0.1", 9092}]

(*)

none

clients.default.max_metadata_sock_retry

bondy.conf
broker_bridge.config_file = $(platform_etc_dir)/broker_bridge_config.json
broker_bridge.kafka.enabled = on
broker_bridge.kafka.clients.default.allow_topic_auto_creation = off
broker_bridge.kafka.clients.default.auto_start_producers = on
broker_bridge.kafka.clients.default.endpoints = [{"127.0.0.1", 9092}]
broker_bridge.kafka.clients.default.max_metadata_sock_retry = 5
broker_bridge.kafka.clients.default.producer.partition_restart_delay_seconds = 2s
broker_bridge.kafka.clients.default.producer.required_acks = 1
broker_bridge.kafka.clients.default.producer.topic_restart_delay_seconds = 10s
broker_bridge.kafka.clients.default.reconnect_cool_down_seconds = 10s
broker_bridge.kafka.clients.default.restart_delay_seconds = 10s
broker_bridge.kafka.topics.account_events = ${MAGENTA_ACCOUNT_EVENTS_TOPIC}
broker_bridge.kafka.topics.user_events = ${MAGENTA_USER_EVENTS_TOPIC}

Kafka Bridge Subscriptions Specification Format Extensions

Action Object

Property

Required

Type

Description

Examples

id

true

string

A unique identifier for this specification

subscribers_1

meta

false

object

An arbitrary object containing user metadata. Bondy treats it as an opaque object.

{"foo" : "bar"}

subscriptions

true

The following snippet provides an example subscriptions using the defined Action Object.

/bondy/etc/subscriptions.json
{
"id":"subscribers_1",
"meta":{},
"subscriptions" : [
{
"bridge": "bondy_kafka_bridge",
"match": {
"realm": "com.example.realm",
"topic" : "com.example.user.created",
"options": {"match": "exact"}
},
"action": {
"type": "produce_sync",
"topic": "{{kafka.topics |> get(com.magenta.wamp_events)}}",
"key": "\"{{event.topic}}/{{event.publication_id}}\"",
"value": "{{event}}",
"options" : {
"client_id": "default",
"acknowledge": true,
"required_acks": "all",
"partition": null,
"partitioner": {
"algorithm": "fnv32a",
"value": "\"{{event.topic}}/{{event.publication_id}}\""
},
"encoding": "json"
}
}
}
]
}