Options
All
  • Public
  • Public/Protected
  • All
Menu

@coaty/binding.mqtt - v2.0.2

Coaty JS - MQTT Communication Binding

Powered by Coaty 2 TypeScript License: MIT release npm version

Table of Contents

Introduction

This binding package provides a Coaty communication binding for transmitting Coaty communication events via the MQTT publish-subscribe messaging protocol.

This package comes with complete API documentation.

This package is considered the reference implementation for all language-specific Coaty MQTT bindings. It includes the specification of the Coaty MQTT communication protocol which must be implemented by all MQTT bindings in order to be interoperable.

How to use

You can install the latest version of this binding package in your Coaty application as follows:

npm install @coaty/binding.mqtt

This npm package targets Coaty projects using ECMAScript version es5 and module format commonjs. It runs in Node.js and in the browser.

Ensure to always install a binding version that is compatible with the @coaty/core framework version you are using in your application, i.e. both packages must have the same major version.

Next, declare the MQTT binding in your Coaty agent container configuration as follows:

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

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

Available binding options are described in the API documentation.

Contributing

If you like this binding, please consider ★ starring the project on github. Contributions are welcome and appreciated.

The recommended practice described in the contribution guidelines of the Coaty JS framework also applies here.

To release a new version of this package, follow these steps:

  1. npm run cut-release - prepare a new release, including automatic versioning, documentation generation, conventional changelog, and tagging.
  2. npm run push-release - push the prepared release to the remote git repo
  3. npm run publish-release - publish the package on npm registry.

License

Code and documentation copyright 2020 Siemens AG.

Code is licensed under the MIT License.

Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Generated using TypeDoc