Twitter’s Kestrel init script for Ubuntu 10.04 Lucid

March 23, 2011

Twitter’s Kestrel is a cool scala based queue server (based on Blaine Cook‘s (@blaine) Ruby based Sterling).

The two main features I like about Kestrel are:

  • Sort-of-transactional – If I take an item I can make sure others can’t get it. If the connect drops it will go back on the queue.
  • Read behind mode – If a certain queue reached a maximum pre-configured amount of RAM or items it will stop storing messages in RAM and will write it directly to the queue log file.

If you happen to be running it on Ubuntu 10.04 and want to use the provided init script (kestrel.sh) you’ll notice that it just won’t run.

Below is a link to an updated script that works on my Ubuntu 10.04 installations.

Assumptions:

  • You are using the paths as suggested in the init script (/usr/local/$APP-NAME, /var/log/$APP-NAME /var/run/$APP-NAME, etc)
  • You are using the openjdk-6-jre-headless package. The script defines the JAVA_HOME directly to where Ubuntu installs that package. You can remove it if needed or change it to suitable values
  • You’ll need to update the JAVA_OPTS parameters for RAM (xmx, etc) for your needs
  • You’ll need to download, compile and install “daemon” from here. It supports Ubuntu 10.04. I don’t know if it has a package, but it was too damn easy to compile it on my own and use it.

Download the script


Be Sociable, Share!

posted in Uncategorized by Eran Sandler

Follow comments via the RSS Feed | Leave a comment | Trackback URL

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org