# Part 2: RabbitMQ for beginners - Sample code

By Lovisa Johansson. Last updated 10 November 2026.

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

The previous [article](/blog/part1-rabbitmq-for-beginners-what-is-rabbitmq/) 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](/blog/part3-rabbitmq-for-beginners-the-management-interface/) if you’d rather get familiar with all parts before you put your hands on the coding.

![Ruby](/img/blog/sm-getting-started-ruby.jpg)
### Part 2.1 - Ruby

Get started with Ruby and RabbitMQ

[Ruby + RabbitMQ](/blog/part2-1-rabbitmq-for-beginners-example-and-sample-code-ruby/)

![Node.js](/img/blog/sm-getting-started-node.jpg)
### Part 2.2 - Node.js

Get started with Node.js and RabbitMQ

[Node.js + RabbitMQ](/blog/part2-2-rabbitmq-for-beginners-example-and-sample-code-node-js/)

![Python](/img/blog/sm-getting-started-python.jpg)
### Part 2.3 - Python

Get started with Python and RabbitMQ

[Python + RabbitMQ](/blog/part2-3-rabbitmq-for-beginners-example-and-sample-code-python/)

### Other languages

The docs have tested sample code for more languages too: [Java](/docs/java/), [Go](/docs/go/), [.NET](/docs/dotnet/), [PHP](/docs/php/), [Rust](/docs/rust/), [TypeScript](/docs/typescript/), [Crystal](/docs/crystal/) and [Clojure](/docs/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](https://customer.cloudamqp.com/signup?topic=get_started)

[Part 1: What is RabbitMQ?](/blog/part1-rabbitmq-for-beginners-what-is-rabbitmq/)

[Part 3: Management interface](/blog/part3-rabbitmq-for-beginners-the-management-interface/)
