Habari STOMP Client for ActiveMQ

Version 10.3-RC2, tested with ActiveMQ 6.3.2 and 6.4.0 lock

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

filter_alt

Selectors on properties and XML

Receive only the messages a consumer needs: numeric comparisons in selectors work on message properties, although STOMP sends them as text, and XPath selectors filter on the XML message body.

swap_horiz

Objects and maps from Java

Receive JMS ObjectMessage and MapMessage from Java applications: the broker transforms them into XML (jms-object-xml, jms-map-xml). The demos include the Java side as Maven projects.

insights

Statistics, advisories and scheduling

Query broker and destination statistics, receive advisory messages, for example when connections open and close, and schedule delivery with a delay, repeats or a cron expression. *

Queue and topic destination support with Apache ActiveMQ

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 Apache ActiveMQ STOMP connector supports a number of different destination types:

  • /queue - SEND and SUBSCRIBE to queues managed by the STOMP gateway
  • /topic - SEND and SUBSCRIBE to transient and durable topics
  • /temp-queue - create temporary queues
  • /temp-topic - create temporary topics

All destination types may be used with Habari STOMP Client for ActiveMQ. 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.

filter_list

Message Selector ⓘ

Message selectors allow a subscription to only receive a subset of the messages sent to a destination.

list

Queue Browser ⓘ

If you want to browse all the messages on a queue in a non-destructive fashion, you can create a browsing subscription.

About the Apache ActiveMQ free open source message broker

Apache ActiveMQ® Classic is a popular and powerful open source messaging and Integration Patterns server.
It supports many Cross Language Clients and Protocols, comes with easy-to-use Enterprise Integration Patterns and many advanced features.
It partially supports Jakarta Messaging 3.1 & JMS 2.0 and fully supports JMS 1.1 and J2EE 1.4+ with support for transient, persistent, transactional and XA messaging.

https://activemq.apache.org/
book

Manual

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

search

API

Browse the online API documentation for Habari STOMP Client for ActiveMQ

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

get_app

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

Free Demo Download

The demo download includes:

  • HabariChatRooms – several chat rooms on one connection, with message listeners
  • PingBroker – a connection test tool

… 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 ActiveMQ:

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 ActiveMQ 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