InterSystems IRIS Data Platform 2020.4 > Class Reference > ENSLIB namespace > EnsLib.MQTT.Adapter.Common


abstract class EnsLib.MQTT.Adapter.Common extends Ens.Adapter, %Net.MQTT.Logger

Property Inventory

Method Inventory


parameter DOMAIN = EnsMQTT;
Domain for $$$Text()
parameter SETTINGS = CleanSession:MQTT,ClientID:MQTT,ConnectTimeout:MQTT,CredentialsName:MQTT:credentialsSelector,KeepAlive:MQTT,LWTTopic:MQTT,LWTMessage:MQTT,QOS:MQTT,Retained:MQTT,SSLConfigName:MQTT:sslConfigSelector,Timeout:MQTT,Topic:MQTT,Trace:MQTT,TraceLevel:MQTT,Url:MQTT;
Configurable settings


property CleanSession as %Boolean [ InitialExpression = 1 ];
This determines if the session to the broker will use a clean session.
Property methods: CleanSessionDisplayToLogical(), CleanSessionGet(), CleanSessionIsValid(), CleanSessionLogicalToDisplay(), CleanSessionNormalize(), CleanSessionSet()
property ClientID as %String);
This is the string which identifies this client to the broker. It must be ascii encoded.

For compatibility the recommended length of this identifier is 23 characters or less but note that certain server implementations permit more.

If not specified the client will create a unique id in the form '73BDD334-83D4-11EA-8229'.

Property methods: ClientIDDisplayToLogical(), ClientIDGet(), ClientIDIsValid(), ClientIDLogicalToDisplay(), ClientIDLogicalToOdbc(), ClientIDNormalize(), ClientIDSet()
property ConnectTimeout as %Integer [ InitialExpression = 30 ];
This is the connect timeout. Connecting to a busy server may take some time and this timeout can be used to avoid a premature connection failure.
Property methods: ConnectTimeoutDisplayToLogical(), ConnectTimeoutGet(), ConnectTimeoutIsValid(), ConnectTimeoutLogicalToDisplay(), ConnectTimeoutNormalize(), ConnectTimeoutSet()
property CredentialsName as %String;
This is the ID name of the set of credentials values to be used to access the MQTT broker. The Username and password defined in your Credentials item must be ascii encoded. Not required if the broker is insecured.
Property methods: CredentialsNameDisplayToLogical(), CredentialsNameGet(), CredentialsNameIsValid(), CredentialsNameLogicalToDisplay(), CredentialsNameLogicalToOdbc(), CredentialsNameNormalize(), CredentialsNameSet()
property KeepAlive as %Integer [ InitialExpression = $$$KeepAliveInterval ];
The client will send keepalive messages to the broker according to the specified interval.
Property methods: KeepAliveDisplayToLogical(), KeepAliveGet(), KeepAliveIsValid(), KeepAliveLogicalToDisplay(), KeepAliveNormalize(), KeepAliveSet()
property LWTMessage as %String;
This is the LWT (Last Will And Testament) message. If specified must be ascii encoded.
Property methods: LWTMessageDisplayToLogical(), LWTMessageGet(), LWTMessageIsValid(), LWTMessageLogicalToDisplay(), LWTMessageLogicalToOdbc(), LWTMessageNormalize(), LWTMessageSet()
property LWTTopic as %String;
This the LWT (Last Will And Testament) Topic. If specified must be ascii encoded. If the client disconnects due to an network error, the LWTMessage will be delivered to subscribers to the LWTTopic.
Property methods: LWTTopicDisplayToLogical(), LWTTopicGet(), LWTTopicIsValid(), LWTTopicLogicalToDisplay(), LWTTopicLogicalToOdbc(), LWTTopicNormalize(), LWTTopicSet()
property QOS as %Integer [ InitialExpression = $$$QOSFireAndForget ];
This determines the quality of service required, $$$QOSWaitForDelivery or $$$QOSFireAndForget
Property methods: QOSDisplayToLogical(), QOSGet(), QOSIsValid(), QOSLogicalToDisplay(), QOSNormalize(), QOSSet()
property Retained as %Boolean [ InitialExpression = 0 ];
This is the flag that indicates to the broker whether the message should be retained by the broker
Property methods: RetainedDisplayToLogical(), RetainedGet(), RetainedIsValid(), RetainedLogicalToDisplay(), RetainedNormalize(), RetainedSet()
property SSLConfigName as %String;
This is the ID name of the SSL configuration that you wish to be used to communicate with the broker. Only used if in fact SSL communication is required.
Property methods: SSLConfigNameDisplayToLogical(), SSLConfigNameGet(), SSLConfigNameIsValid(), SSLConfigNameLogicalToDisplay(), SSLConfigNameLogicalToOdbc(), SSLConfigNameNormalize(), SSLConfigNameSet()
property Status as %String [ InitialExpression = "Created" ];
This is the internal status of the adapter
Property methods: StatusDisplayToLogical(), StatusGet(), StatusIsValid(), StatusLogicalToDisplay(), StatusLogicalToOdbc(), StatusNormalize(), StatusSet()
property Timeout as %Numeric (MINVAL = "0.1") [ InitialExpression = 1 ];
This is the timeout expressed in seconds to wait to send (with ack ) or receive a message
Property methods: TimeoutDisplayToLogical(), TimeoutGet(), TimeoutIsValid(), TimeoutLogicalToDisplay(), TimeoutNormalize(), TimeoutSet()
property Topic as %String;
This is the topic name of the topic to which you wish to publish or subscribe. The topic must be ascii encoded
Property methods: TopicDisplayToLogical(), TopicGet(), TopicIsValid(), TopicLogicalToDisplay(), TopicLogicalToOdbc(), TopicNormalize(), TopicSet()
property Trace as %Boolean [ InitialExpression = 0 ];
This enables or disables the MQTT tracing facility
Property methods: TraceDisplayToLogical(), TraceGet(), TraceIsValid(), TraceLevelDisplayToLogical(), TraceLevelGet(), TraceLevelIsValid(), TraceLevelLogicalToDisplay(), TraceLevelNormalize(), TraceLevelSet(), TraceLogicalToDisplay(), TraceNormalize(), TraceSet(), TracerGet(), TracerGetSwizzled(), TracerIsValid(), TracerNewObject(), TracerSet()
property TraceLevel as %Integer [ InitialExpression = $$$MQTTCLIENTTRACEFATAL ];
This is the trace level for the MQTT library. Set this to log the required detail of trace information See for legal values
Property methods: TraceLevelDisplayToLogical(), TraceLevelGet(), TraceLevelIsValid(), TraceLevelLogicalToDisplay(), TraceLevelNormalize(), TraceLevelSet()
property Url as %String);
This is the url of the broker to which you wish to communicate. The scheme is either 'tcp' or 'ssl' followed by the

domain name and port delimited by a ':', for example, 'tcp://BIGBADAPPLE.local:1883'. Typically ssl enabled end points

are configured with a port of 8883 but this is not mandatory. The url must be ascii encoded.

Property methods: UrlDisplayToLogical(), UrlGet(), UrlIsValid(), UrlLogicalToDisplay(), UrlLogicalToOdbc(), UrlNormalize(), UrlSet()


method Connect() as %Status [ Language = objectscript ]
method Log(level As %Integer, message As %String) [ Language = objectscript ]
Simply log the value
method OnInit() as %Status [ Language = objectscript ]
Inherited description: This user callback method is called just after %OnNew()
method StatusSet(value) as %Status [ Language = objectscript ]
Setter override for status value

Inherited Members

Inherited Properties

Inherited Methods