The latest release of Apama Community Edition provides two new connectivity plug-ins, an MQTT transport and a native JSON Codec.
This connectivity plug-in is a transport for the MQTT protocol (see http://mqtt.org/). MQTT is an extremely lightweight publish/subscribe messaging transport used widely by IoT devices. This allows the Apama correlator to send and receive events from a remote system via an MQTT broker, such as Software AG Universal Messaging. Sending or receiving events is as simple as configuring the MQTT connectivity bundle in your project, and writing some EPL inside a monitor:
// Send event to MQTT
MyEvent e := MyEvent(1, "Hello world", [0.0, 1.0, 2.0]);
send e to "mqtt:sendTopic";
// Subscribe to MQTT events
The MQTT transport documentation is available here: MQTT transport.
Native JSON Codec
The second connectivity plug-in is a JSON codec. This codec can be used in a connectivity chain to translate JSON documents into maps and vice-versa. It mimics the behaviour of the existing JSON codec which is implemented in Java, whereas the new codec is implemented as a native plug-in. This allows you to encode and decode JSON documents on limited resource devices (such as Raspberry Pis) where you may not want the memory overhead of a JVM.
The JSON Codec documentation is available here: JSON codec.
As with all connectivity plug-in transports, you can use one or more codecs to describe how you would like EPL events to be translated to and from the form of the message on the wire. So with this release you can turn your events to/from JSON documents which are sent over MQTT, allowing communication with non-Apama components that do not need to understand Apama’s proprietary string representation of events.
– Richard Thrippleton