Skip to content

Enhance mqtt binding configuration syntax #420

@jfallows

Description

@jfallows

We currently have the following syntax in mqtt binding...

mqtt_server0:
  type: mqtt
  kind: server
  exit: mqtt_kafka_proxy0

...which routes session, publish and subscribe streams to the default exit.

When we need to add specific routes for individual topics to direct them to another binding...

mqtt_server0:
  type: mqtt
  kind: server
  routes:
    - when:
        - capabilities: session
        - capabilities: publish
          topic: command
        - capabilities: subscribe
          topic: reply
      exit: mqtt_kafka_proxy1
  exit: mqtt_kafka_proxy0

...we can route session stream and specific publish or subscribe topics.

Proposing we improve readability by removing capabilities.

mqtt_server0:
  type: mqtt
  kind: server
  routes:
    - when:
        - session:
            - client-id: *
        - publish:
            - topic: command
        - subscribe:
            - topic: reply
      exit: mqtt_kafka_proxy1
  exit: mqtt_kafka_proxy0

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions