Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt mqtt and mqtt kafka configs to new changes #101

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion src/reference/config/bindings/binding-mqtt-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ This is currently in the incubator. Follow the [Zilla repo](https://github.com/a
:::

```yaml {2}
mqtt_server:
mqtt_kafka_proxy:
type: mqtt-kafka
kind: proxy
options:
topics:
sessions: mqtt-sessions
messages: mqtt-messages
retained: mqtt-retained
exit: kafka_cache_client
```

Expand All @@ -33,6 +38,7 @@ Defines a binding with `mqtt-kafka` support, with `proxy` behavior.
:::: note Properties

- [kind\*](#kind)
- [options](#options)
- [exit](#exit)

::: right
Expand All @@ -47,6 +53,38 @@ Defines a binding with `mqtt-kafka` support, with `proxy` behavior.

Behave as a `mqtt-kafka` `proxy`.

### options

> `object`

`mqtt-kafka`-specific options for configuring the `kafka` topics that the proxy will use to route mqtt messages and session states

```yaml
options:
topics:
sessions: mqtt-sessions
messages: mqtt-messages
retained: mqtt-retained
```

#### options.topics.sessions

> `object`

Compacted Kafka topic for storing mqtt session states.

#### options.topics.messages

> `object`

Kafka topic used for routing mqtt messages.

#### options.topics.retained

> `object`

Compacted Kafka topic for storing mqtt retained messages.

### exit

> `string`
Expand Down
19 changes: 13 additions & 6 deletions src/reference/config/bindings/binding-mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ mqtt_server:
kind: server
routes:
- when:
- topic: messages
capabilities: publish_and_subscribe
- topic: sensor/one
capabilities: publish
exit: mqtt_kafka_proxy
- when:
- topic: sensor/two
capabilities: subscribe
exit: mqtt_kafka_proxy
- when:
- capabilities: session
exit: mqtt_kafka_proxy
```

Expand Down Expand Up @@ -100,7 +107,7 @@ List of conditions (any match) to match this route.
routes:
- when:
- topic: echo
capabilities: publish_and_subscribe
capabilities: publish
```

#### when[].topic\*
Expand All @@ -111,10 +118,10 @@ Topic name.

#### when[].capabilities

> `enum` [ "session", "publish_only", "subscribe_only", "publish_and_subscribe" ]
> `enum` [ "session", "publish_only", "subscribe_only" ]

Session, publish, subscribe, or both publish and subscribe.\
Defaults to `"publish_and_subscribe"`.
Session, publish, subscribe.\
Publish and subscribe if not specified.

### routes[].exit\*

Expand Down
Loading