Adam Warski

29 May 2012

ElasticMQ 0.5: journalling, stand-alone server


ElasticMQ is a message queue server, with Scala, Java, and an Amazon SQS-compatible interface. It also supports guaranteed messaging via replicating the messages across a cluster of servers.

The new 0.5 version brings two major features. Firstly the file-log, that is a journal for operations on the queue&message storage. Using it makes most sense with the in-memory storage, as the DB storage has its own persistence. Thanks to the journal you can make sure that you won’t loose messages across server restarts, when moving the whole server etc. The file log uses only append operations to write to files, making it pretty fast (no random access). However, writing the journal is an asynchronous process, so on a server crash some data could be lost (why making this synchronous wouldn’t help much – see the README). If you require an even higher level of message durability, use replication.

Of course, replication can be combined with journalling, providing a server where your messages are safe both when stopping and starting the whole cluster, and in case of an individual node crash.

The second feature is (finally!) a stand-alone server distribution. You can download a .tar.gz or a .zip archive. Running the server is very easy, you just need to unpack it and execute the provided or run.bat script.

Configuration is done in a type-safe way (via Ostrich). You can specify which storage to use (in-memory or DB-backed), should the file log be used, if and how to setup replication and node discovery, and whether to expose an SQS interface. The configuration file is self-documenting, see the base class and the default config file.

Have fun!


comments powered by Disqus

Any questions?

Can’t find the answer you’re looking for?