Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommunicationOptions

Options used for communication.

Hierarchy

  • CommunicationOptions

Index

Properties

Optional binding

Communication binding for transmitting Coaty communication events via a specific publish-subscribe messaging protocol.

Use one of the predefined Coaty communication bindings which are provided as separate npm packages named @coaty/binding.*. For example, to use the MQTT protocol as a binding for your Coaty application:

import { MqttBinding } from "@coaty/binding.mqtt";

const configuration: Configuration = {
...
communication: {
binding: MqttBinding.withOptions({
brokerUrl: ... ,
...
}),
...
},
...
};
remarks

This feature is experimental until Coaty 3. If no binding is specified, a default MQTT binding is used with the MQTT specific options defined in this interface.

Optional brokerUrl

brokerUrl?: string
deprecated

since 2.1.0. Specify in binding options instead.

Connection Url to MQTT broker (schema 'protocol://host:port') (optional). If the servers option in property mqttClientOptions is specified this property is ignored.

Optional mqttClientOptions

mqttClientOptions?: any
deprecated

since 2.1.0. Specify as binding options instead.

Options passed to MQTT Client (see MQTT.js connect options).

In addition to the MQTT.js options, you can also pass a QoS level (0 | 1 | 2) for publications, subscriptions, and last will messages in the qos property. If it is not specified, the QoS level is 0.

Optional namespace

namespace?: string
deprecated

since 2.1.0. Specify in binding options instead.

Namespace used to isolate different Coaty applications (optional).

Communication events are only routed between agents within a common communication namespace.

A namespace string must not contain the following characters: NULL (U+0000), # (U+0023), + (U+002B), / (U+002F).

If not specified or empty, a default namespace named "-" is used.

Optional shouldAutoStart

shouldAutoStart?: boolean

Determines whether the communication manager should start initially when the container has been resolved. Its value defaults to false.

Optional shouldEnableCrossNamespacing

shouldEnableCrossNamespacing?: boolean
deprecated

since 2.1.0. Specify in binding options instead.

Determines whether to enable cross-namespace communication between agents in special use cases (optional).

If true, an agent receives communication events published by any agent in the same networking infrastructure, regardless of namespace.

If not specified or false, this option is not enabled.

Optional useProtocolCompliantClientId

useProtocolCompliantClientId?: boolean
deprecated

since 2.1.0.

Determines whether the communication manager should provide a protocol compliant client ID when connecting to the broker/router.

If not specified, the value of this option defaults to false.

For example, MQTT Spec 3.1 states that the broker MUST allow Client IDs which are between 1 and 23 UTF-8 encoded bytes in length, and that contain only the characters "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ". However, broker implementations are free to allow non-compliant Client IDs.

By default, non-compliant Client IDs of the form "Coaty" are used where <uuid> specifies the objectId of the communication manager's Identity object. If you experience issues with a specific broker, specify this option as true.

Generated using TypeDoc