Habari STOMP Client for RabbitMQ

Version 10.3-RC2, tested with RabbitMQ 4.4.0 lock

Holiday closure Habarisoft is closed from until .

Habari STOMP Client for RabbitMQ is a high-level, object-oriented STOMP client library for Delphi and Free Pascal which provides access to the RabbitMQ free open source message broker.

stream

Streams

Read a stream from the first message, the next one, an offset or a point in time, and replay it as often as needed. With filter values, the broker skips chunks of messages that the consumer does not need. New in 10.3: the BankEventLog demo.

alt_route

Exchanges and queues

Send to exchanges with routing keys and subscribe with binding patterns. Use quorum queues, queues created outside the STOMP gateway, and temporary queues for replies.

sync_alt

Delphi and Java together

Exchange messages with applications that use the RabbitMQ Java client. Demos with source show routing and request/reply in both directions, plus dead-letter exchanges, message and queue TTL, and priority queues.

Queues, topics, exchanges and streams with RabbitMQ

The STOMP specification does not prescribe what kinds of destinations a broker must support, instead the value of the destination header in SEND and MESSAGE frames is broker-specific. The RabbitMQ STOMP plugin supports a number of different destination types:

  • /exchange - SEND to arbitrary routing keys and SUBSCRIBE to arbitrary binding patterns
  • /queue - SEND and SUBSCRIBE to queues managed by the STOMP gateway
  • /amq/queue - SEND and SUBSCRIBE to queues created outside the STOMP gateway
  • /topic - SEND and SUBSCRIBE to transient and durable topics
  • /temp-queue/ - create temporary queues (in reply-to headers only)

Queue options select the queue type:

  • x-queue-type=stream - streams: SUBSCRIBE from the first message, the last chunk, the next message, an offset or a point in time (x-stream-offset), and with a filter (x-stream-filter)
  • x-queue-type=quorum - quorum queues

All destination types may be used with Habari STOMP Client for RabbitMQ. For details, see API documentation at IMQContext (for the simplified API) or ISession (for the classic API).

"Hello, World!" - Send to message broker

code

Connects to a message broker instance with default port and credentials, and sends a persistent text message with a message property.

    Factory: IConnectionFactory
    ...
    Factory := TBTConnectionFactory.Create('stomp://example.com');
    ...
    procedure SendHelloWorld;
    var
      Ctx: IMQContext;
      Destination: IDestination;
      TextMessage: ITextMessage;
    begin
      Ctx := Factory.CreateContext;
      try
        Destination := Ctx.CreateQueue('hello_world');
        TextMessage := Ctx.CreateTextMessage('Hello, World!');
        TextMessage.SetStringProperty('language', 'en');
        Ctx.CreateProducer
          .SetDeliveryMode(dmPersistent)
          .Send(Destination, TextMessage);
      finally
        Ctx.Close;
      end;
    end;

"Hello, World!" - Receive from message broker

code

Connects to a message broker instance with default port and credentials, and receives a text message.

    Factory: IConnectionFactory
    ...
    Factory := TBTConnectionFactory.Create('stomp://example.com');
    ...
    procedure ReceiveHelloWorld;
    var
      Ctx: IMQContext;
      Destination: IDestination;
      Consumer: IMQConsumer;
      TextMessage: ITextMessage;
    begin
      Ctx := Factory.CreateContext;
      try
        Destination := Ctx.CreateQueue('hello_world');
        Consumer := Ctx.CreateConsumer(Destination);
        TextMessage := Consumer.Receive(2500) as ITextMessage;
        if Assigned(TextMessage) then 
          ShowMessage(TextMessage.Text);
      finally
        Ctx.Close;
      end;
    end;

Common Extensions

Habari STOMP Client libraries support broker-specific extensions of the STOMP specification. Most extensions and features can be used across all Habari Client Library editions. Exceptions are marked with ⓘ here and in the feature matrix.

timer

Message Expiration

By default, a message never expires. If a message will become obsolete after a certain period, however, you may want to set an expiration time for the message.

traffic

Message Priority

A client can specify a priority for each message it sends. Message priorities affect the order in which the messages are delivered to the consumers.

storage

Persistent Messages

Brokers support reliable messaging by allowing messages to be persisted so that they can be recovered if there is a failure which kills the broker.

pause_circle_outline

Durable Subscriptions

Even if the client which created the durable subscription is not online, it can still get a copy of all the messages sent to the topic when it comes back online.

import_export

Rich Message Conversion

Binary and text messages can be exchanged between STOMP and non-STOMP clients. (Object and map messages are exchanged as text messages.)

sync

Temporary Queues ⓘ

Temporary destinations are typically used to receive response messages in a request/response messaging exchange.

About the RabbitMQ broker

RabbitMQ is a messaging and streaming broker that runs on-premises, in the cloud and on a local machine. Besides STOMP it supports AMQP 0-9-1, AMQP 1.0 and MQTT 5.0, so Delphi and Free Pascal applications can exchange messages with clients written in other languages.

https://www.rabbitmq.com/
book

Manual

Read the "Getting Started" user guide for Habari STOMP Client for RabbitMQ

search

API

Browse the online API documentation for Habari STOMP Client for RabbitMQ

list

Release notes

Browse release notes (new features, enhancements, and bug fixes)

help_outline

FAQ

Frequently asked questions: use cases, licensing, and technical

alternate_email

Contact

Contact Habarisoft for support and sales inquiries

view_comfy

Feature matrix

View the Habari STOMP Client feature matrix

Facts and figures

speed
18,600
messages per second
received, median, Free Pascal 64-bit with Indy (Delphi 2009: 9,000) 1
compress
+157 KB
executable size
smallest increase: Delphi 2009 with Synapse 2
task_alt
367
unit tests passed
with Indy, Synapse and mORMot2, Free Pascal (Delphi 2009: 365) 3
code
14,400
lines of source code
in 64 units, full source included

Executable size increase 2

Compiler Synapse mORMot2 Indy
Delphi 2009 (Win32) +157 KB +217 KB +295 KB
Free Pascal 3.2.2 (Win64) +430 KB +483 KB +625 KB

Measured on 30 October 2026 with Habari STOMP Client for RabbitMQ 10.3-RC1 and RabbitMQ 4.4.0 (STOMP plugin) on the same computer: Intel Core i7-1260P, 16 GB RAM, NVMe SSD, Windows 11 Home. Compilers: Delphi 2009 (Win32) and Free Pascal 3.2.2 (Win64). Your results depend on hardware, broker configuration, message size and acknowledgement mode. Click or tap a footnote number for details.

get_app

Try before you buy - get the demo applications of Habari STOMP Client for RabbitMQ:

Free Demo Download

The demo download includes:

  • HabariChatRooms – several chat rooms on one connection, with message listeners
  • PingBroker – a connection test tool
  • BankEventLog – a bank account event log on a RabbitMQ stream

… and the full version adds several broker-specific demos, with source code.

add_shopping_cart

Obtain a subscription-based Single Developer License for Habari STOMP Client for RabbitMQ:

See prices »

Subscribe »
Tick both boxes below to enable.


To cancel a subscription, visit the Paddle customer portal.

lock

Registered users may download the installer for Habari STOMP Client for RabbitMQ version 10.3-RC2 here:

Download Installer  lock

The installer includes:

  • full source code of the library, for Delphi and Free Pascal
  • communication adapters for Indy, Synapse and mORMot2 (the TCP libraries themselves are not included)
  • example projects with source code, shared and broker-specific
  • DUnit and FPCUnit test suites
  • Getting Started guide (PDF) and API reference (HTML)
  • slf4p, the Simple Logging Facade for Pascal