|
| 1 | +# Instructions for AI Agents |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This repository contains runnable code for the [RabbitMQ tutorials](https://www.rabbitmq.com/tutorials) |
| 6 | +in many languages and client libraries. The accompanying prose lives on the website: this repo holds only executable examples. |
| 7 | + |
| 8 | +All tutorials require a RabbitMQ node running on `localhost` with default settings and use |
| 9 | +the default `localhost`-constrained seed user `guest` with well known credentials. |
| 10 | + |
| 11 | +Tutorial code here and the prose at [`rabbitmq/rabbitmq-website`](https://github.com/rabbitmq/rabbitmq-website) |
| 12 | +should be kept in sync: not necessarily in lockstep, but updated consistently within a few days of each other. |
| 13 | + |
| 14 | + |
| 15 | +## Repository Structure |
| 16 | + |
| 17 | +Each top-level directory (called a tutorial port) is a self-contained tutorial set for one language (client library), |
| 18 | +with its own `README.md` covering setup and run instructions. Some directories use symlinks |
| 19 | +to reuse code. |
| 20 | + |
| 21 | +Directories with a `-stream` suffix cover the [RabbitMQ Stream protocol](https://www.rabbitmq.com/docs/streams); the rest cover AMQP 0-9-1. |
| 22 | + |
| 23 | +Individual directories (ports) can have their local `AGENTS.md` with language-specific instructions, e.g. |
| 24 | +around how to avoid standard input and output pitfalls when asked to run permutations of these tutorials |
| 25 | +(e.g. T1 publishers in Java and a T1 consumer that uses Swift 6 and Bunny.swift). |
| 26 | + |
| 27 | +AMQP 0-9-1 tutorials follow a standard numbering with consistent base filenames across languages: |
| 28 | + |
| 29 | + 1. Tutorial 1 (a.k.a. T1, "Hello World"): `send` / `receive` |
| 30 | + 2. Tutorial 2 (a.k.a. T2, "Work Queues"): `new_task` / `worker` |
| 31 | + 3. Tutorial 3 (T3, "Publish/Subscribe"): `emit_log` / `receive_logs` |
| 32 | + 4. Tutorial 4 (T4, "Routing"): `emit_log_direct` / `receive_logs_direct` |
| 33 | + 5. Tutorial 5 (T5, "Topics"): `emit_log_topic` / `receive_logs_topic` |
| 34 | + 6. Tutorial 6 (T6, "RPC"): `rpc_client` / `rpc_server` |
| 35 | + 7. Tutorial 7 (T7, "Publisher Confirms"): `publisher_confirms` |
| 36 | + |
| 37 | +Stream tutorials cover `send` / `receive` and `offset_tracking_send` / `offset_tracking_receive`. |
| 38 | + |
| 39 | + |
| 40 | +## Adding or Modifying Tutorials |
| 41 | + |
| 42 | + * Read the language directory's README first |
| 43 | + * Follow the existing code style and naming conventions of the directory you are editing |
| 44 | + * Tutorials are learning material, not production code: keep them simple, readable, and self-contained |
| 45 | + * Keep dependencies minimal; use the idiomatic RabbitMQ client library for the language |
| 46 | + |
| 47 | + |
| 48 | +## Style |
| 49 | + |
| 50 | + * Only add comments where the logic isn't self-evident; keep them concise |
| 51 | + * Use proper English grammar and punctuation |
| 52 | + * Never add full stops to Markdown list items |
| 53 | + |
| 54 | + |
| 55 | +## Git |
| 56 | + |
| 57 | + * Never add yourself to the list of commit co-authors |
| 58 | + * Never mention yourself in commit messages in any way |
0 commit comments