Introduction

Gozirra is a lightweight implementation of the Stomp protocol. As of the first release it includes both client and server implementations for Java. The name stinks, and may change.

Stomp (previously TTMP) is a simple publish/subscribe messaging protocol. Its main attraction, to me at least, is its simplicity and focus. A Ruby client comes out to 107 lines of code. The Java server and client of this project fit in a jarball about 14KB large. You can easily communicate with a Stomp server via telnet, and it provides publish, subscribe, receipts, and transactions. It is everything you need for a lightweight communication protocol.

Gozirra is not intended to be a scalable standalone MOM solution. While it can be run in standalone mode, it is really targetted at being a library for providing embedded messaging to other applications. If you want a more feature full messaging provider, check out ActiveMQ, the reference platform for Stomp.

Getting

You can check out the source code with Mercurial:

hg clone http://hg.germane-software.com/Gozirra

If you improve Gozirra, please do send me the patches.

Building

Requires Jakarta Ant. You build one of: all-jar, server-only-jar, or client-only-jar depending on what you're using it for.

client-only-jar
Produces a 8kb stomp-client.jar. Useful for applications that only want to be able to connect via a network to a Stomp server.
server-only-jar
Produces a 12.5kb stomp-server.jar. Useful for applications that want to run a server, but don't need the client class. Right now, this doesn't gain you much over the all-jar, but I'll refactor with factories and it'll get a bit smaller in future versions.
all-jar
Produces a 13.5kb stomp.jar. Contains both the client and server codes.

Usage

A brief tutorial is available -- brief, but probably covering everything you'd want to do with the library.

To do

  • Implement a queueing mechanism, for persistent messages. Currently, SENDs are only delivered to clients which are subscribed while the message is received. This makes the server act like an IRC server. Queueing will allow messages to be persistified.
  • Currently, clients can connect to the port and start sending messages without ever sending a CONNECT message. The server should enforce a CONNECT/CONNECTED transaction.
  • Error messages should be fleshed out, with destinations (where possible), more information, and in more cases.
  • Implement the binary (content-length:) extension