Brokered Messaging System
Description
The cross-platform message broker employed by DCT is “ActiveMQ,” an open-source JMS- compliant application supplied by the Apache Software Foundation. A detailed description of ActiveMQ and JMS is outside the scope of this document but a brief description is warranted.
In this implementation, ActiveMQ lies between the DCT and LIG systems, which do not directly communicate with each other. Each system publishes its own data to the broker and subscribes to the other system’s data via the broker. Messages are organized using “topics,” which are string identifiers defined by each publisher. Subscribers need to specify the desired topic but do not define it. An arbitrary number of subscribers may exist for any published topic, with each one receiving a copy of each message. Only the broker is aware of which systems are publishing and subscribing to data. ActiveMQ decouples publishers and receivers and is stateless.
DCT will publish to a topic but won’t “know” that LIG components are subscribed to that topic; LIG components will likewise publish to a topic and won’t “know” that DCT is subscribed. The DCT, Broker and LIG applications are operating-system independent and can reside on one or more machines.
...
Implementation
ActiveMQ Installation
The installation of ActiveMQ is simple as it does not require configurationrequire extensive configuration. Installation instructions and system requirements are specified at the ActiveMQ web site (see referenced documents). The main configuration file is "activemq.xml
" and it is advisable to keep a copy from the previous version for reference when upgrading the application.
Java and ActiveMQ
ActiveMQ implements the native Java messaging system (ActiveMQ is written in Java); Java and ActiveMQ can communicate directly.
LabVIEW, ActiveMQ and CMS
LabVIEW does not have a native implementation of JMS. To overcome this incompatibility, the CMS library supplied by the Apache Software Foundation will be utilized. CMS is written in C++ and will be compiled into a Windows DLL that LabVIEW can use. CMS will generate and receive the JMS-compatible messages on behalf of the DCT LabVIEW application layer. CMS will notify LabVIEW of incoming messages by generating a LabVIEW event. LabVIEW will send configuration parameters and messages by passing them to the CMS library.
...