RabbitMQ or Redpanda on Railway: which queue to pick
Short answer: pick RabbitMQ if you need a job queue or message routing between services, where a consumer takes a message, acknowledges it and it is gone. Pick Redpanda if you need a Kafka-compatible log with retention and replay, or your code already uses a Kafka client. On Railway, Tracklayer’s templates run RabbitMQ 4.3.6 and Redpanda v26.2.4 as single, password-protected nodes with a volume.
Deploy RabbitMQ on RailwayHow the two differ
| RabbitMQ template | Redpanda template | |
|---|---|---|
| Protocol | AMQP 0-9-1 and 1.0; plugins for MQTT, STOMP and streams | Kafka API, with Schema Registry and HTTP Proxy built in |
| Model | Exchanges and routing keys into queues, with acknowledgements, retries and dead-letter exchanges | Topics with retention and replay |
| Typical uses | Background jobs (for example Celery, Spring AMQP, MassTransit, NestJS), fan-out, absorbing bursts of webhooks | Event streaming, change data capture, log ingestion, replay |
| Web UI | Management UI with its own login | Redpanda Console behind a Caddy basic-auth gateway |
| Version | 4.3.6 | v26.2.4 (Console v3.12.0) |
If you only need to run background work for a web app, RabbitMQ is usually the smaller step. If several consumers need to read the same events independently, or you need to replay history, the Kafka model fits better.
Deploy RabbitMQ, step by step
These steps use Tracklayer’s RabbitMQ template.
- Deploy. No input is needed; the administrator password and Erlang cookie are generated.
- Sign in to the management UI with
RABBITMQ_DEFAULT_USERandRABBITMQ_DEFAULT_PASS. - Create a user per app. Under Admin, add a virtual host and a separate user for each application instead of sharing the administrator.
- Connect your service. In an app service in the same project, set
RABBITMQ_URLto${{RabbitMQ.RABBITMQ_URL}}. For Celery, setCELERY_BROKER_URLto the same reference. - Declare durable queues. RabbitMQ 4.3 rejects non-durable queues that are not exclusive. Do not change
RABBITMQ_NODENAMEafter the first deploy, or RabbitMQ starts with an empty database.
Deploy Redpanda, step by step
These steps use Tracklayer’s Redpanda template.
- Deploy. No input is needed; all passwords are generated.
- Sign in to Redpanda Console at the
console-gatewaydomain withBASIC_AUTH_USERNAMEandBASIC_AUTH_PASSWORD. - Create a topic. Automatic topic creation is off by default.
- Connect your service. Set
KAFKA_BROKERSto${{redpanda.KAFKA_BOOTSTRAP_SERVERS}}, plusKAFKA_SASL_MECHANISM,KAFKA_SASL_USERNAMEandKAFKA_SASL_PASSWORDfrom the same service. Use security protocolSASL_PLAINTEXT; traffic stays on the private network. - Add least-privilege users. Create a separate user per application with
rpk security user createin theredpandaservice shell, and grant ACLs instead of sharing the superuser.
What it costs
Railway bills by usage. Both templates state their figures as follows.
- RabbitMQ, estimated, not measured: about 0.2 GB of RAM at idle (roughly $2.50 per month) and 0.5 GB with a typical small workload (roughly $8 per month). Free and Trial plans work for evaluation; the template recommends Hobby for real workloads.
- Redpanda, idle RAM measured locally, not on Railway: broker about 0.2 GB, Console 45 MB and the gateway 11 MB. The template estimates about $4 per month idle, and about $23 per month for a few MB per second of events with 7-day retention (about 1.3 GB RAM and 20 GB disk). It lists Hobby as the minimum plan.
For Redpanda, REDPANDA_MEMORY (default 1G) and retention length are the main cost levers.
Limits to know
- Both are single nodes. There is no failover, so a redeploy briefly interrupts the broker. Clients should reconnect automatically.
- RabbitMQ and Redpanda passwords are used only on first start. Rotate them with the tools in the service shell, then update the variable.
- Neither template configures TLS for external clients.
Other options
For caching and simple queues backed by Redis, see the Redis and cache templates. To run background automation without writing consumers, see n8n in queue mode. All guides are listed at /guides/.
FAQ
How do I log in to the management UI?
RabbitMQ: open the service's public domain and sign in with RABBITMQ_DEFAULT_USER (default admin) and RABBITMQ_DEFAULT_PASS from the Variables tab. Redpanda: open the console-gateway public domain and use BASIC_AUTH_USERNAME and BASIC_AUTH_PASSWORD from that service's variables. All passwords are generated.
Is it safe to connect from outside Railway?
Both templates keep the broker on Railway's private network by default. An optional TCP proxy exposes it, but the proxy adds no TLS, so message contents travel unencrypted. Redpanda's SCRAM login does not send the password itself, but the data is still unencrypted. Use the proxy only for data that is not sensitive, or run clients on the private network.
Do messages survive a redeploy?
Yes, both use a volume. For RabbitMQ, publish messages as persistent and use durable queues. A redeploy briefly stops the broker because a volume can be mounted by only one deployment at a time.
Are there licence terms to know?
RabbitMQ is under the Mozilla Public License 2.0. Redpanda core is under the Business Source License 1.1, which allows production use for your own applications but not offering Redpanda as a streaming or queuing service to third parties. Each version converts to Apache-2.0 four years after release. This is a summary, not legal advice.
Can I run a cluster?
No. Both templates are single nodes, so Redpanda runs with replication factor 1. Scale vertically. Multi-node clusters are outside the scope of both templates.