Integrating messaging enterprise middleware with real-time front-end technology.
jWebSocket easily interacts with any JMS compliant message queue instance. The JMS-Plug-in is an out-of-the-box component of jWebSocket. Basically, the architecture of this plug-in was designed to treat JMS nodes in the same way like all other jWebSocket clients. Particularly this means:
jWebSocket uses JMS and since jWebSocket is a framework it is designed to integrate all JMS compliant message brokers. In its version 1.0 jWebSocket comes with an implementation for Apache ActiveMQ. In future further enterprise messaging broker systems will be approved.
JMS compliant message brokers play a central role in enterprise middleware architectures. From the JMS perspective jWebSocket can be associated as one partner component in this architecture. jWebSocket provides its services to the enterprise components via its JMS Gateway. jWebSocket comes with lots of interfaces to various devices like native Smartphone apps, Arduino hardware or Remote Control and Monitoring systems. All these are made available to JMS nodes by the jWebSocket JMS gateway.
Per default jWebSocket comes with a JMS plug-in configured for Apache ActiveMQ.
With Apache Active MQ you not only obtain a JMS compliant message broker, you also get a gateway to STOMP as well as to AMQP clients. So you easily can interact with applications for instance written in Ruby, Perl, Python or PHP or even written for .NET, together with jWebSocket a ready-to-use enterprise middleware solution.
To install Apache ActiveMQ on your server please follow the following steps:
There are two topics used for the bridge between jWebSocket and the JMS message broker.
Like standardized for all jWebSocket plug-ins, also jWebSocket JMS plug-in is configured by spring. All JMS topics and parameters are configurable in the spring configuration file %JWEBSOCKET_HOME%conf/JMSPlugIn/jmx.xml.
For each queue and topic Apache ActiveMQ creates Advisory Topics, these are topics which inform subscribers about consumer and producer activities, for instance when a new consumer connects to the bridge (technically, when a JMS client listens to the topic org.jwebsocket.jws2jms topic) or when a certain consumer disconnects (e.g. when a JMS client shuts down).
When the jWebSocket JMS plug-in starts it establishes a connection to the topic org.jwebsocket.jws2jms as publisher and to org.jwebsocket.jms2jws as subscriber. Furthermore it registers as subscriber at the advisory topic ActiveMQ.Advisory.Consumer.Topic.org.jwebsocket.jws2jms.
This advisory topic notifies jWebSocket about new JMS clients (consumers) which then are maintained in the list of JMSConnector instances in the JMSEngine component.
Since jWebSocket supports the multiple engine concept the JMSEngine including all its clients fulfill all security requirements of all other clients in the network infrastructure. Broadcasts initiated by the server or by one client are send to all clients (WebSocket client and JMS nodes).
The JMS Gateway of jWebSocket listens to events of the advisory topic. When a JMS client connects as a subscriber to the topic org.jwebsocket.jws2jms a notification is queued on the advisory topic ActiveMQ.Advisory.Consumer.Topic.org.jwebsocket.jws2jms. Internally jWebSocket maintains a JMSEngine with an instance of JMSConnector per registered JMS node. Since jWebSocket supports multiple engine it is ensured that all WebSocket clients can interact with all JMS clients. As soon as a JMS node terminates an ActiveMQ queue an according message into the advisory queue. jWebSocket removes the corresponding client from its JMSEngine and cleans up the memory for it.
jWebSocket sends a welcome message to each JMS node which registers at the JMS Gateway. The JMS node can use this message to start any communication process or workflow.
Continue reading about JMS Gateway here.
Copyright © 2013 Innotrade GmbH. All rights reserved.