EdgeServerJMS
From RifidiWiki
Contents
JMS in the Edge Server
This page describes how JMS is used in the Edge Server
A very, very brief JMS Introduction
JMS (Java Messaging Service) is a standard for a messaging API as specified by JSR 914. A JMS Provider is an implementation of the JMS specification. The idea is that there is a server whose job it is to route messages. It is up to the provider to define exactly how this server works. For example, some providers require you to start the server administratively from the command line and allow you to control it using JMX. Other providers allow you to start the server in your source code.
There are two types of clients to the server. A JMS Consumer will consume JMS Messages. A JMS Producer will send messages to the server.
There are two ways to use JMS. You can either use a point-to-point model, or you can use a publish-subscribe model. The basic difference is that with the point-to-point model, for every message produced, there is at most one consumer. With the publish-subscribe model, there can be more than one consumer. Point-to-point implementations will use a JMS Queue as a destination. Publish-subscribe implementations will use a JMS Topic. For a better explanation, see: this article.
Rifidi Edge Server uses ActiveMQ as its provider. With ActiveMQ, the server is called a Broker. Rifidi uses spring to create and start the broker.
Overview
The Rifidi Edge Server uses JMS (ActiveMQ) to pass certain kinds of data from component to component. The edge server separates its usage of JMS into two logical components:
- Internal Message Bus - This is used for tag data that is collected by sensor plugins (e.g. Commands executing on an Alien9800 session). It is implemented using an ActiveMQ broker with one Destination (specifically a Topic). Since it is only used internally, clients (both producers and consumers) connect to it using a vm connection.
- External Notification - This is used to expose tag events and notification events to software outside the edge server. It is implemented using an ActiveMQ broker with two Destinations (one Topic for tag events and one for notification events). Clients to the broker (both producers and consumers) can connect to it using a vm connection. Clients external to the edge server can use a TCP connection.