Guides RabbitMQ Last updated:

Part 2: RabbitMQ for beginners - Sample code

Part 2: RabbitMQ for beginners - Sample code
Part 2 of RabbitMQ for beginners - Sample code for Ruby, Node.js, Python and more.

The previous article explained message queuing and RabbitMQ. Now it’s time to write some code: a publisher that sends a message to a queue, and a worker that consumes it and sends an ack when the work is done.

The sample code lives in our docs, where it’s tested and kept up to date with the latest client libraries. Pick your language below. You can also jump straight to Part 3: The management interface if you’d rather get familiar with all parts before you put your hands on the coding.

Ruby

Part 2.1 - Ruby

Get started with Ruby and RabbitMQ

Ruby + RabbitMQ
Node.js

Part 2.2 - Node.js

Get started with Node.js and RabbitMQ

Node.js + RabbitMQ
Python

Part 2.3 - Python

Get started with Python and RabbitMQ

Python + RabbitMQ

Other languages

The docs have tested sample code for more languages too: Java, Go, .NET, PHP, Rust, TypeScript, Crystal and Clojure.

Guide — RabbitMQ for beginners

CloudAMQP - industry-leading RabbitMQ as a Service

Fully managed RabbitMQ clusters on all major clouds. Free plan available - no credit card required.

Sign up for free