harcon-mqtt

MQTT plugin for the harcon messaging/service bus of node-based enterprise entities.

Usage no npm install needed!

<script type="module">
  import harconMqtt from 'https://cdn.skypack.dev/harcon-mqtt';
</script>

README

harcon-mqtt

AMQP transport layer ("Barrel") plugin for harcon.

Both PUB/SUB and PUSH/PULL socket types are supported. See socket types explained here.

Installation

npm install harcon harcon-mqtt --save

Usage

var Harcon = require('harcon');
var Mqtt = require('harcon-mqtt');

var mqttConfig = {
    connectURL: 'mqtt://localhost',
    timeout: 0
};
var harcon = new Harcon( { Barrel: Mqtt.Barrel, barrel: mqttConfig }, function(err){
} );

Should the recipients be not available or fail to meet the timeframe defined by the attribute 'timeout', harcon will call the callbacks of the given messages with an error.

js-standard-style