# @coaty/binding.mqtt

> Coaty MQTT communication binding for Node.js and browsers

Latest version **2.0.5** (published 2021-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @coaty/binding.mqtt
pnpm add @coaty/binding.mqtt
yarn add @coaty/binding.mqtt
bun add @coaty/binding.mqtt
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2021-10-22 |
| First published | 2020-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 2 |
| Unpacked size | 47 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Siemens AG |
| Maintainers | coaty-001 |
| Keywords | Coaty, communication, binding, MQTT, Node.js, browser, javascript, typescript |

## Links

- npm: https://www.npmjs.com/package/@coaty/binding.mqtt
- Repository: https://github.com/coatyio/binding.mqtt.js
- Homepage: https://coaty.io
- Issues: https://github.com/coatyio/binding.mqtt.js/issues
- npm.io page: https://npm.io/package/@coaty/binding.mqtt

## Dependencies (2)

- [mqtt](https://npm.io/package/mqtt.md) ^4.2.8
- [@coaty/core](https://npm.io/package/@coaty/core.md) ^2.4.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.0.5 (latest) — 2021-10-22
- 2.0.4 — 2021-07-01
- 2.0.3 — 2021-06-29
- 2.0.2 — 2020-09-25
- 2.0.1 — 2020-06-17
- 2.0.0 — 2020-06-04

## README

# Coaty JS - MQTT Communication Binding

[![Powered by Coaty 2](https://img.shields.io/badge/Powered%20by-Coaty%202-FF8C00.svg)](https://coaty.io)
[![TypeScript](https://img.shields.io/badge/Source%20code-TypeScript-007ACC.svg)](http://www.typescriptlang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![release](https://img.shields.io/badge/release-Conventional%20Commits-yellow.svg)](https://conventionalcommits.org/)
[![npm version](https://badge.fury.io/js/%40coaty%2Fbinding.mqtt.svg)](https://www.npmjs.com/package/@coaty/binding.mqtt)

## Table of Contents

* [Introduction](#introduction)
* [How to use](#how-to-use)
* [Contributing](#contributing)
* [License](#license)

## Introduction

This binding package provides a [Coaty](https://coaty.io) communication binding
for transmitting Coaty communication events via the [MQTT](https://mqtt.org/)
publish-subscribe messaging protocol.

This package comes with complete [API
documentation](https://coatyio.github.io/binding.mqtt.js/api/index.html).

This package is considered the *reference implementation* for all
language-specific Coaty MQTT bindings. It includes the specification of the
[Coaty MQTT communication
protocol](https://coatyio.github.io/binding.mqtt.js/man/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:

```sh
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:

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

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

Available binding options are described in the [API
documentation](https://coatyio.github.io/binding.mqtt.js/api/interfaces/mqttbindingoptions.html).

## Contributing

If you like this binding, please consider &#x2605; starring [the project on
github](https://github.com/coatyio/binding.mqtt.js). Contributions are welcome
and appreciated.

The recommended practice described in the [contribution
guidelines](https://github.com/coatyio/coaty-js/blob/master/CONTRIBUTING.md) 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](https://opensource.org/licenses/MIT).

Documentation is licensed under a
[Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).

---
_Source: https://npm.io/package/@coaty/binding.mqtt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
