Fixing Layer requirements

This commit is contained in:
Martin Karkowski 2021-10-20 21:48:43 +02:00
parent 1128e918a7
commit b6c20d69c3

View File

@ -91,7 +91,7 @@ export class MQTTLayer implements ICommunicationInterface {
constructor( constructor(
public uri: string, public uri: string,
public preTopic: string = hostname(), public preTopic: string = hostname(),
public qos: 0 | 1 | 2 = 1, public qos: 0 | 1 | 2 = 2,
level: LoggerLevel = "info" level: LoggerLevel = "info"
) { ) {
// Make shure we use the http before connecting. // Make shure we use the http before connecting.
@ -106,6 +106,8 @@ export class MQTTLayer implements ICommunicationInterface {
this.allowServiceRedundancy = false; this.allowServiceRedundancy = false;
this.id = generateId(); this.id = generateId();
this.receivesOwnMessages = true;
// Create a Broker and use the provided ID // Create a Broker and use the provided ID
this._client = connect(this.uri); this._client = connect(this.uri);