InterSystems IRIS includes support for MQTT through built-in adapters for message processing, which can act as both inbound and outbound adapters. However, InterSystems IRIS itself does not natively include an MQTT broker. Below are the details about how IRIS handles MQTT connections:
-
MQTT Adapters:
- The
EnsLib.MQTT.Adapter.Inbound
adapter allows subscribing to topics and receiving MQTT messages. - The
EnsLib.MQTT.Adapter.Outbound
adapter allows publishing messages to MQTT topics. - These adapters can be used to build interoperability productions to handle MQTT messages effectively. This includes creating and subscribing to topics, custom business services, and operations to process the messages [1][2].
- The
-
IRIS-integrated MQTT Broker:
- While IRIS itself is not an MQTT broker, a few IRIS-integrated MQTT broker solutions are available, like
IRIS MQTT for Manufacturing
andIRIS MQTT for Health
. These solutions provide an integrated broker functionality directly managed within the IRIS platform, removing the need for middleware [3][4].
- While IRIS itself is not an MQTT broker, a few IRIS-integrated MQTT broker solutions are available, like
-
Working with IRIS MQTT Adapters:
-
Broker Setup:
-
Using the MQTT Adapters:
- InterSystems provides tools to define the connection details (e.g., broker's URL, credentials, topics) and manage message flow between devices and IRIS components [7].
If your goal is to integrate with an existing broker, or connect clients directly to IRIS over MQTT intermediates, additional configurations or external intermediary brokers might be required based on your use case.
Sources:
To implement data transformation where OBX 5.1 contains certain text (e.g., "DETECTED") and then sets the Abnormal Flag field accordingly while handling case sensitivity:
-
Create a Custom Function: Consider creating a utility class function like
SetAbnormalFlag()
to check the ObservationValue (OBX 5) and set the flag based on a conditional logic. This can handle both uppercase and lowercase occurrences by normalizing the text using$ZCONVERT
or equivalent functions with case-insensitive checks [1][2]. -
Setup Data Transformation Logic:
- Use a
foreach
loop on all the repeating OBX segments within the message structure. - Within the loop, retrieve the value from OBX 5 using
GetValueAt
. - Check if this value contains "DETECTED" (you can use
$FIND
or$ZCONVERT
for case-insensitivity). - If detected, set the Abnormal Flag in OBX 8 using
SetValueAt
[1].
- Use a
-
Example Structure:
Set segmentCount = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp(*)") For segmentIndex = 1:1:segmentCount { Set observationValue = source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBXgrp("_segmentIndex_").OBX:5") If ($FIND($ZCONVERT(observationValue, "U"), "DETECTED")) { Do source.SetValueAt("ABNORMAL", "PIDgrpgrp(1).ORCgrp(1).OBXgrp("_segmentIndex_").OBX:8", "set") } }
This process ensures that the text comparison is conducted without being affected by its case, and the Abnormal Flag is appropriately set for each relevant OBX segment [1][2][3].
Let me know if additional assistance is needed!
Sources:
The issue you are experiencing with
%FileSet
reporting that a network directory does not exist, even though%File.DirectoryExists()
confirms that the path is valid, can arise due to specific differences in how these methods or queries interact with the operating system and network resources.Potential Cause:
%FileSet
relies on SQL queries and requires the directory to not only exist but also be accessible in the context of how InterSystems IRIS interacts with the filesystem. Network drives may sometimes have access permissions or visibility issues depending on the user session in which the IRIS service is running. This is consistent with similar issues reported where commands function differently for mapped network drives versus internal directories [1].Mapped Network Drive Access:
For network locations accessed in an IRIS session, ensure:
NET USE
) needs to be run during the server startup in%ZSTART
or explicit connection established using$ZF(-1)
to map the drives appropriately [1].Debugging Approach:
$ZF(-1,...)
to verify the visibility of the network drive as seen by the IRIS process.NormalizeDirectory()
method to check that the directory paths are properly normalized and in a valid format [2]. For example:objectscript
Write ##class(%File).NormalizeDirectory("\\MYNETWORK_DRIVE\DFS-Shared_Product\GXM")
Error Codes and Messages:
The
%FileSet
error stems from lower-level checks that fail to recognize the directory exists on the remote path, despite%File.DirectoryExists()
validating its existence directly. This mismatch often points to environmental configuration issues specific to file system paths being interpreted differently under SQL queries versus ObjectScript methods.Suggestions:
- Verify that the service running InterSystems IRIS has the proper user context and permissions.
- Use the FileSet query under a different test setup using local paths first to isolate the behavior.
- As a workaround, instead of relying solely on
%FileSet
, you could build a custom directory listing logic using methods like$ZF(-1)
or%File.%Next()
related functions for network paths.[1][2]
Sources: