Native STOMP client libraries for Delphi / Object Pascal: connect your application with enterprise message brokers

Release 2024.04 is now available

Habari STOMP Client libraries enable Object Pascal applications to take advantage of message broker / message queue technology - which is distributed, loosely coupled, reliable and asynchronous - to build integrated systems, using peer-to-peer and publish-subscribe communication models.

The libraries are available for the open source message brokers ActiveMQ, ActiveMQ Artemis, Eclipse OpenMQ and RabbitMQ. ActiveMQ, ActiveMQ Artemis and OpenMQ are also serving as default messaging subsystems in Enterprise Application Servers such as GlassFish, Payara, TomEE+ or WildFly.

Typical use cases of message brokers include decoupling components , load balancing (distributed processing), client notification in multi-tiered applications, dynamically configuring and controlling software, logging and auditing and cross-platform integration for example with ISAPI, PHP, .NET, Python or Jakarta EE based web applications.

Code Examples

"Hello, World!" - Send to message broker

code

Connects to a message broker instance with default port and credentials, and sends a text message. This example uses the new, simplified API.

function CreateMQContext: IMQContext;
var
  Factory: IConnectionFactory
begin
  Factory := TBTConnectionFactory.Create('stomp://example.com');
  Result := Factory.CreateContext;
end;

procedure SendHelloWorld;
var
  Ctx: IMQContext;
  Destination: IDestination;
  Producer: IMQProducer;
begin
  Ctx := CreateMQContext;
  try
    Destination := Ctx.CreateQueue('hello_world');
    Producer := Ctx.CreateProducer;
    Producer.Send(Destination, 'Hello, World!');
  finally
    Ctx.Close;
  end;
end;

"Hello, World!" - Receive from message broker

code

Connects to a remote broker instance with specified credentials, and receives a text message. This example uses the new, simplified API.

function CreateMQContext: IMQContext;
var
  Factory: IConnectionFactory
begin
  Factory := TBTConnectionFactory.Create('stomp://example.com');
  Result := Factory.CreateContext('username', 'password');
end;

procedure ReceiveHelloWorld;
var
  Ctx: IMQContext;
  Destination: IDestination;
  Consumer: IMQConsumer;
  TextMessage: ITextMessage;
begin
  Ctx := CreateMQContext;
  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;

language

The libraries are specialized for different message brokers, but share a common high-level API.

view_comfy

Use the feature matrix below to compare the broker-specific capabilities and extra features.

get_app

For information on a specific library, choose a version from the top menu or in the matrix header below.

Version Habari STOMP Client for ActiveMQ Habari STOMP Client for Artemis Habari STOMP Client for OpenMQ Habari STOMP Client for RabbitMQ
STOMP version support
Version 1.0 / 1.1 / 1.2 ✓/✓ /✓ ✓/✓ /✓ ✓/ /✓ ✓/✓ /✓
STOMP optional features
Ack Mode: auto/client/client-individual ✓/✓/✓ ✓/✓/✓ ✓/✓/✓ ✓/✓/✓
Receipt Requests
Heart-beating #361
Transacted Send
Transacted Ack
Broker-provided STOMP extensions
Message Expiration
Message Priority
Persistent Messages
Rich Message Conversion
Topic Destinations
Queue Destinations
Durable Topics
Temporary Queues ARTEMIS-3164 #1534 (closed)
Message Selector
Queue Browser
Client-side extensions
Failover Protocol
Connection Builder
Testing
DUnit Tests
FPCUnit Tests
Unit test source code
Documentation
API (HTML)
Getting started (PDF)
Example code
Compiler
Delphi 2009+
Free Pascal 3.2.0+
TCP/IP libraries
Internet Direct (Indy) 10.6.2
Ararat Synapse  
Synopse mORMot 1
Synopse mORMot 2
TLS/SSL support
Logging
SLF4P logging facade
Platforms
Linux 32/64 Bit (Delphi/FPC) /✓ /✓ /✓ /✓
Windows 32 Bit (Delphi/FPC) ✓/✓ ✓/✓ ✓/✓ ✓/✓
Windows 64 Bit (Delphi/FPC) /✓ /✓ /✓ /✓
Other platforms
Additional information
Source included
Tested with ActiveMQ 6.1.0 ActiveMQ Artemis 2.33.0 Eclipse OpenMQ 6.4.0 RabbitMQ 3.13.0
Release date 20 February 2024 20 February 2024 20 February 2024 20 February 2024
Buy now » Buy now » Buy now » Buy now »

⊝ - Not supported by message broker STOMP implementation

⧂ - Limited support, complimentary and/or experimental feature

Use cases

apps

Typical use cases of message brokers include: load balancing (distributed processing), client notification in multi-tiered applications, dynamically configuring and controlling software, alerting and logging, and integration with ISAPI, PHP, .NET, Python or Jakarta EE based web applications.

General

check

Yes! Basic support is included for one year. Advanced and experimental features such as (for example) SSL/TLS, third party libraries, Linux, non-Unicode Delphi versions and message broker configuration are not covered by the basic support plan.

On the library home page you will find a link to the download area for registered users. The credentials (user name and password) will be sent to you when a new release is available.

A trial version with precompiled units (DCU) is not available. To see if the library works, you may use the free demo applications which are included in the demo download file. Also, you may contact Habarisoft to receive additional source or binary code examples.

Licensing

check

Yes, each developer that uses our products must have their own license.

check

No, the licenses are perpetual. However, you will be using the last product version released before your free upgrade period expired.

Distribution

block

No, the source code is not redistributable, even if you change it.

Technical

Only a network library is required. Please check the feature matrix for available options.

Indy is hosted on GitHub at https://github.com/IndySockets

No, just add the Indy directories Lib\Core, Lib\Protocols and Lib\System to the project search path. The Indy version which is included in Delphi may remain unchanged.

The library includes two experimental adapter classes for usage with OpenSSL, one for Indy (Internet Direct) and one for Synapse. Technical support for these adapter classes and OpenSSL configuration is not included in the basic support package.

No, using a connection concurrently by different threads is unsafe. If different threads need to communicate with the message broker, every thread must use its own IConnection object.

check

Yes! When it is used correctly and as designed, no memory leaks will appear.

check

Yes! Service applications can use the library to communicate with the message broker, if connections are not used concurrently by different threads.

check

Yes! ISAPI DLL modules can use the library to communicate with the message broker, if connections are not used concurrently by different threads.

check

Yes! All library versions include support for transactional sending of messages. Transactional message ack currently is provided for ActiveMQ and RabbitMQ.

No, the library only supports the Stomp wire format.

Advanced Chemistry Development

aim Systems, Inc.

Airport Business Information Systems - Hamburg Airport

Altron HealthTech

Bangkok Medical Software

Baxter Healthcare

BD Kiestra

C.A. Shea & Company

Command Alkon

CompuGroup Medical Malaysia

DrillScan

Emsisoft

Fen Technology

Intelligence Data Communication

Kokusai Inc.

Light & Wonder

logiCells

MESAS

ModivCare

peptides&elephants

Pfizer Manufacturing Belgium

Prime Vision

Polaris Elements

Retail Pro International

STEMCELL Technologies

Taiwan Semiconductor Manufacturing Company

Thum+Mahr

VECTRONIC Aerospace