SwiftMQ requires a JDK/JRE 1.3 or higher installed on your computer. To make all scripts work contained in the distribution, the "java" executable must be in your PATH. To check this, call
java -version
If the Java VM starts and displays its version number, then it's ok. Otherwise, put your JDK/JRE "bin" directory into your PATH environment variable.
There is no special installation required. Simply unpack the SwiftMQ distribution archive.
After you have unpacked the archive, you will find the following directory structure below the distribution's top-level directory:
| Directory | Content |
|---|---|
| conf | contains configuration files for 2 routers, connected as a mini network |
| doc | contains the online documentation |
| jars | contains all jar files, incl. jms, jndi, jsse |
| j2ee | contains SwiftMQ's JMS resource adapter |
| kernel | contains all jar and config meta data of all Kernel Swiftlets |
| deploy | base directory for hot deployment of Extension Swiftlets |
| jmsapp | base directory for hot deployment of JMS applications |
| extensions | contains deployment bundles of Extension Swiftlets |
| log | contains 2 subdirs for router1 and router2 to store their logs |
| samples | contains the original JMS examples from Sun plus an example of a CLI-based administration client |
| scripts | contains 2 subdirs with startscripts for each router in Unix and Windows format |
| store | store directory for router1 and router2 |
| trace | if trace is enabled, the routers trace their output into their subdirs |
This distribution contains an example configuration with 2 SwiftMQ routers, connected as a mini network. The routers have the logical names "router1" and "router2" where "router2" connects to "router1".
Authentication is disabled, so you can use all resources without defining special grants. To login, use either the anonymous user (no username, no password) or the administrator account (username "admin", password "secret").
Each router has a JMS listener; router1 on port 4001, router2 on port 4002. The JMS listeners on both routers are using the com.swiftmq.net.PlainSocketFactory.
Both routers have a predefined queue "testqueue" which can be looked up via JNDI on "testqueue@router1" resp. "testqueue@router2".
There is one predefined topic "testtopic" which can be looked up via JNDI under this name.
Go to the "scripts" directory and switch to the subfolder that matches your platform. Then start the router startup scripts as follows:
./smqr1 ./smqr2
Both routers are now up, running, and connected.
To start CLI, SwiftMQ's command line interface, perform a
./cli
from the platform subfolder of the "scripts" directory. As username/password press the return key (anonymous) or use "admin", password "secret".
If you like to use SwiftMQ Explorer, the graphical administration console, go to your platform subfolder of the "scripts" directory and perform a
./explorer
When the SwiftMQ Explorer appears on your screen, go to menu "Connection" and perform a "Connect...". A dialog window asks you about JNDI provider URL, name of the queue connection factory, username/password. Leave the fields untouched and press the "Connect" button. After a few seconds you will see 2 new router nodes in the left "Navigator" frame.
There are several JMS examples included in the "samples" directory. Some are original from Sun, others are more advanced to use within router networks. There is also a Readme.txt in the samples directory which you may consult before using it. You should also read the JMS implementation notes of the JMS Swiftlet.