# discourse/message_bus

A reliable and robust messaging bus for Ruby and Rack

Repository: https://github.com/discourse/message_bus
Canonical: https://ross.abutalabs.com/products/message_bus
Language: Ruby
License: MIT
License Family: permissive
Topics: rubygem
Last push: 2026-08-03T17:09:28+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 4858, "days_push": 30, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1662, forks 129 (observed 2026-08-28T04:05:18.647965+00:00)

## What it is
MessageBus is a Ruby gem providing a reliable publish/subscribe messaging bus for server-to-server and server-to-web-client communication. It runs as Rack middleware, supporting polling, long-polling, and streaming across all common Ruby web servers.

## Use cases
- publish and subscribe to messages between Ruby processes
- push real-time updates from a Rails or Sinatra app to browsers
- deliver targeted messages to specific users or client sessions
- replay message backlogs on a channel after reconnecting
- handle thousands of concurrent long-poll connections in Rack apps

## When to choose
- you run a Rails, Sinatra, or Rack app and need reliable pub/sub messaging without a dedicated message broker
- you want real-time client updates using long-polling that works on standard Ruby web servers
- you need battle-tested infrastructure, as it powers Discourse in production at scale

## When to avoid
- you need a full-featured distributed message queue like Kafka or RabbitMQ with guaranteed delivery semantics across services
- your stack is not Ruby/Rack based
- you prefer WebSocket-first solutions like Action Cable or AnyCable

## Facets
- artifact type: library
- maturity: stable
- function: message-queue, middleware, websocket, http-server
- domain: web-development, backend
- platform: ruby
- tags: pub-sub, long-polling, rack-middleware, real-time-messaging, rubygem, messaging, real-time, web-server, rack

## Member repositories
- discourse/message_bus (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:18.647965+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:33.867732+00:00, confidence not recorded.
  - readme: https://github.com/discourse/message_bus (fetched 2026-08-28T04:05:18.647965+00:00, sha aa94b59a7c52)
- Data as of 2026-08-30T08:39:29.467469+00:00.
