Skip to Content
MessageX
06 · Reference

Management HTTP API

Dashboard-facing HTTP endpoints provided by the broker process.

The MessageX broker starts an HTTP server alongside its TCP listener. The React dashboard uses this API for management views and actions. The API is part of the broker process; it is not a separate broker container in the repository Compose file.

By default, the broker HTTP server listens on port 3000 inside the container. The repository Compose configuration exposes it to the internal Docker network but does not publish it directly to the host.

Health endpoints

MethodPathPurpose
GET/pingLightweight ping response
GET/healthBasic broker HTTP health
GET/health/readyReadiness check used by the Compose broker health check

Management authentication

The broker mounts its browser-session routes under /api/auth. Other /api management routes are protected by the management authentication middleware.

Use the dashboard's supported login/session flow rather than assuming management endpoints are anonymous.

Resource endpoints

Queues

MethodPathPurpose
GET/api/queuesList queues
GET/api/queues/:nameGet one queue
POST/api/queuesDeclare a queue
DELETE/api/queues/:nameDelete a queue
GET/api/queues/:name/statsRead message counts by state
GET/api/queues/:name/messagesRead queue messages

Queue creation accepts name and optional durable, autoDelete, maxDeliveryCount, and deadLetterQueue fields.

Exchanges and bindings

MethodPathPurpose
GET/api/exchangesList exchanges
POST/api/exchangesDeclare an exchange
DELETE/api/exchanges/:nameDelete an exchange
GET/api/bindingsList bindings
POST/api/bindingsCreate a binding
DELETE/api/bindingsRemove a binding

Exchange creation accepts name, type, and optional durable. Supported exchange types are direct, fanout, topic, and headers.

Binding creation accepts exchangeName, queueName, an optional routingKey, and optional arguments.

Publishing

POST /api/publish accepts exchangeName, a JSON message, and optional routingKey and headers.

This endpoint uses the same broker message repository and routing implementation as TCP publish commands.

Overview and operational endpoints

MethodPathPurpose
GET/api/overviewBroker resource and message counts
GET/api/connectionsActive connection information
GET/api/health/detailedDetailed process and broker health
GET/api/metricsBroker metrics
GET/api/database/poolPostgreSQL pool information

These operational routes require management authentication like the other /api endpoints.

Implementation

The HTTP server reuses broker repositories for queues, exchanges, bindings, and messages. It also reads the PostgreSQL pool for overview and statistics, and references the active connection and consumer managers for live broker state.

Source: apps/broker/src/server/http.server.ts.

This reference reflects routes registered in the current repository source. Check the implementation and validation logic before building an external integration against these endpoints.

On this page