Models

Source

object

A subscription source subscribed by this connection

addressesArray<string>

The source addresses this connection consumes messages from. The "telemetry", "events", "command_response" aliases should be used for connections of type "hono".

consumerCountinteger1

The number of consumers that should be attached to each source address

qosinteger

Maximum Quality-of-Service level to request when subscribing for messages

authorizationContextArray<string>

The authorization context defines all authorization subjects associated for this source

enforcementobject

Defines an enforcement for this source to make sure that a device can only access its associated Thing.

Show child attributes
inputstringrequired

The input value of the enforcement that should identify the origin of the message (e.g. a device id). You can use placeholders within this field depending on the connection type. E.g. for AMQP 1.0 connections you can use {{ header:[any-header-name] }} to resolve the value from a message header.

Example
{{ header:device_id }}
filtersArray<string>required

An array of filters. One of the defined filters must match the input value from the message otherwise the message is rejected.

acknowledgementRequestsobject

Contains requests to acknowledgements which must be fulfilled before a message consumed from this source is technically settled/ACKed at the e.g. message broker.

Show child attributes
includesArray<string>required

Acknowledgement requests to be included for each message consumed by this source.

filterstring

Optional filter to be applied to the requested acknowledgements - takes an fn:filter() function expression

Example
[
  "fn:filter(header:qos,'ne',0)"
]
payloadMappingArray<string>

A list of payload mappings that are applied to messages received via this source. If no payload mapping is specified the standard Ditto mapping is used as default.

headerMappingobject

Ditto protocol headers computed from external headers and certain properties of the Ditto protocol messages created by payload mapping.

replyTargetobject

Configuration for sending responses of incoming commands.

Show child attributes
enabledboolean

Whether reply target is enabled.

addressstringrequired

The target address where responses of incoming commands from the parent source are published to. The following placeholders are allowed within the target address:

  • Thing ID: {{ thing:id }}

  • Thing Namespace: {{ thing:namespace }}

  • Thing Name: {{ thing:name }} (the part of the ID without the namespace)

  • Ditto protocol topic attribute: {{ topic:[topic-placeholder-attr] }}

  • Ditto protocol header value: {{ header:[any-header-name] }}

If placeholder resolution fails for a response, then the response is dropped. NOTE Use "command" alias for connections of type "hono".

Example
[
  "{{ header:device_id }}",
  "{{ source:address }}"
]
headerMappingobject

External headers computed from headers and other properties of Ditto protocol messages.

expectedResponseTypesArray<string>responseerrornack

Contains a list of response types that should be published to the reply target.