Requirements
SwiftMQ requires a JDK/JRE 1.2 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
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.
Installation
There is no special installation required. Simply unpack the SwiftMQ distribution archive.
Distribution Content
After you have unpacked the archive, you will find the following directory structure below the distributions 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 |
|
log | contains 2 subdirs for router1 and router2 to store their logs |
|
samples | contains the original JMS examples from Sun |
|
scripts | contains 2 subdirs with startscripts for each router in Unix and Windows format |
|
store | backstore directory for router1 and router2 |
|
trace | if trace is enabled, the routers trace their output into their subdirs |
|
The 'jars' sub-directory contains serveral SwiftMQ jar files:
File | Content |
|
swiftmq.jar | The 'standard' jar file. Contains all necessary classes. |
|
swiftmq_lean.jar | A leaner jar file. Contains all necessary classes except that for the SwiftMQ Explorer. Useful if you run a router on a machine with minimal disk space without using the SwiftMQ Explorer locally. |
|
smqclient.jar | Contains only the JMS client part of SwiftMQ, execpt CLI, SwiftMQ Explorer, JMS/JNDI core classes. Useful for a JMS client on a small device. |
|
Example Configuration
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".
Both routers have the same configuration:
Authentication
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").
JMS
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.
Point-To-Point
Both routers have a predefined queue "testqueue" which can be looked up via JNDI on "testqueue@router1" resp. "testqueue@router2".
Publish/Subscribe
There is one predefined topic "testtopic" which can be looked up via JNDI under this name.
Starting the Routers
Go to the "scripts" directory and switch to the subfolder that matches your platform. Then start the router startup scripts as follows:
Both router are now up, running, and connected.
Starting CLI
To start CLI, SwiftMQ's command line interface, perform a
from the platform subfolder of the "scripts" directory. As username/password press the return key (anonymous) or use "admin", password "secret".
Starting SwiftMQ Explorer
If you like to use SwiftMQ Explorer, the graphical administration console, go to your platform subfolder of the "scripts" directory and perform a
If 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.
JMS Examples
If you want to see/use some JMS examples, read the document JMS Implementation Notes.