Skip to content

Instantly share code, notes, and snippets.

View michaelklishin's full-sized avatar

Michael Klishin michaelklishin

View GitHub Profile

How to set up a RabbitMQ package (apt) mirror

Below is a very brief version that demonstrates how a mirror of Team RabbitMQ's apt repository can be set up and hosted by anyone.

It assumes basic familiarity with Debian-based Linux and Nginx. There are only two tools involved:

  • apt-mirror to sync the repo (please sync from ppa1.novemberain.com which has a very ample traffic quota in comparison to our Cloudsmith account)
  • Nginx to serve the synchronized static files

A few more things that have to be set up

No. Time Source Destination Protocol Length Info
7 0.003263 127.0.0.1 127.0.0.1 AMQP 393 Connection.Start
Frame 7: 393 bytes on wire (3144 bits), 393 bytes captured (3144 bits)
Arrival Time: Jul 21, 2011 08:05:16.227656000 MSD
Epoch Time: 1311221116.227656000 seconds
[Time delta from previous captured frame: 0.000145000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.003263000 seconds]
Frame Number: 7
@michaelklishin
michaelklishin / per_queue_message_ttl.rb
Created July 29, 2011 04:20
An example of using per-queue message time-to-live feature of RabbitMQ with amqp gem 0.8.0
require 'amqp'
require "amqp/extensions/rabbitmq"
AMQP.start do |connection|
puts "Connected!"
channel = AMQP::Channel.new(connection)
channel.on_error do |ch, channel_close|
puts "Oops! a channel-level exception: #{channel_close.reply_text}"
end
+# Add Debian Wheezy backports repository to obtain init-system-helpers
+gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
+gpg -a --export 7638D0442B90D010 | sudo apt-key add -
+echo 'deb http://ftp.debian.org/debian wheezy-backports main' | sudo tee /etc/apt/sources.list.d/wheezy_backports.list
+
+# Add Erlang Solutions repository to obtain esl-erlang
+wget -O- https://packages.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add -
+echo 'deb https://packages.erlang-solutions.com/debian wheezy contrib' | sudo tee /etc/apt/sources.list.d/esl.list
+
+sudo apt-get update

The RabbitMQ team has been looking at the performance differences between the latest RMQ releases. After benchmarking multiple RabbitMQ version/Erlang version/build environment permutations, we have some findings to share.

The new management plugin and stats emission/collection implementation in RabbitMQ 3.6.7 produces a slight drop in performance in some workloads.

Another finding suggests that RabbitMQ packages compiled in Erlang R16B03 (such as the 3.6.x releases produced by our team) will have a minor throughput drop when running on Erlang 20.x. Packages built on Erlang 19.x.x and ran on Erlang 20.x.x showed no such difference.

Dear RabbitMQ community,

We have an update on Erlang/OTP 20 and RabbitMQ compatibility.

First, let's clarify when OTP 20 support will be available: RabbitMQ versions before 3.6.11 will not work correctly with OTP-20.

What's the risk of upgrading from 19.x to 20 on an unsupported version? When upgrading from OTP-19.x(or earlier) to OTP-20 all the persistent data will be permanently lost!

@michaelklishin
michaelklishin / js2-mode.el
Created May 10, 2011 15:03
js2-mode by Steve Yegge
;;; js2.el -- an improved JavaScript editing mode
;;;
;;; This file was auto-generated on Thu Jul 23 16:21:42 2009 from files:
;;; js2-externs.el
;;; js2-vars.el
;;; js2-util.el
;;; js2-scan.el
;;; js2-messages.el
;;; js2-ast.el
;;; js2-highlight.el
[base] [Fri, 16 Sep 2011 21:31:55 -0700] DEBUG: Chef::Exceptions::ShellCommandFailed: bash[installing gem chef for 1.8.6] (rvm::multi line 48) had an error: Expected process to exit 0, but it exited with 134
---- Begin output of "bash" "/tmp/chef-script20110916-1086-mnz7p-0" ----
STDOUT: Using /home/vagrant/.rvm/gems/ruby-1.8.6-p420
STDERR: *** buffer overflow detected ***: ruby terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x394390]
/lib/tls/i686/cmov/libc.so.6(+0xe12ca)[0x3932ca]
/home/vagrant/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/1.8/i686-linux/syck.so(rb_syck_mktime+0x587)[0x51ff47]
/home/vagrant/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/1.8/i686-linux/syck.so(yaml_org_handler+0x932)[0x520912]
/home/vagrant/.rvm/rubies/ruby-1.8.6-p420/lib/ruby/1.8/i686-linux/syck.so(syck_defaultresolver_node_import+0x3f)[0x520bbf]
@michaelklishin
michaelklishin / gist:1223640
Created September 17, 2011 04:55
Why Ruby 1.8.6 and 1.9.1 are no longer provided on travis-ci.org, effective September 17th, 2011

There are 3 reasons for doing this:

  • Neither of those versions is actively maintained.

  • Neither of those versions is actively used.

  • They cause us maintenance problems (like 1.8.6 not being able to install gems or 1.9.1 failing to compile (!)), and travis-ci.org is maintained by literally a handful of people in their spare time.

For example, we had to do the following:

RabbitMQ team is proud to announce that starting from the version 3.7.0 RabbitMQ will come with the new command line tools, known as rabbitmqctl.

The reasoning behind this change is that in previous versions rabbitmqctl was deeply integrated into server code, which made it hard to implement new commands, extend and modify existing commands.

The tools is written on [Elixir][elixir] programming language. This will make it easier for people new to erlang to start extending the tools. Although after built, the tools don't require Elixir to be installed.