Consume a JMS ObjectMessage with Habari Client for ActiveMQ

As a follow-up to the previous article about MapMessage exchange with Apache ActiveMQ, here is an example for an ObjectMessage, sent from a Java JMS client and consumed from a Delphi application.

Continue reading


Consume ActiveMQ JMS MapMessages from Delphi

One outstanding feature of the popular Apache ActiveMQ message broker is its rich message conversion capability, which allows cross-platform/cross-language exchange by serialization of JMS object and map messages to XML or JSON. Non-Java clients do not have to support the native ActiveMQ wire protocol. Instead, they can use a simple protocol such as STOMP.

Continue reading

Apache ActiveMQ 5.12.0 released

Apache ActiveMQ 5.12.0 resolves several issues, and provides significant improves to the AMQP and MQTT support in the broker as well as fixing issues with STOMP and MQTT over WebSockets plus much much more.


Continue reading

ActiveMQ, Qpid, HornetQ and RabbitMQ in Comparison

An article by Thomas Beyer (also available in German language) gives a short introduction into popular messaging solutions which are available as free open source projects.

“Newer architectures and the standardized AMQP protocol have led to a flood of message brokers. All brokers take claim to be fast, robust and reliable. But what really distinguish the broker? How do I choose the right broker? Should we continue to use established brokers such as the ActiveMQ or try a more modern one? This article attempts to answer these questions and help the reader in selecting a suitable broker.”

Article URL:

Apache ActiveMQ 5.10.0 released

Apache ActiveMQ 5.10.0 resolves more than 234 issues, mostly bug fixes and improvements. It has the following new features:

  • Java 8 support
  • Apache Shiro Security Plugin –
  • Hardened MQTT support
  • Hardened AMQP support
  • Hardened LevelDB store
  • Improved RAR/JCA adapter
  • Improved Runtime configuration plugin
  • Improved Web console


A Delphi and Free Pascal STOMP based client library is available from Habarisoft.

Habari Client Libraries


Query ActiveMQ Broker Statistics with Delphi

Broker Configuration

To configure ActiveMQ to use the statistics plugin add the following to the ActiveMQ XML configuration:


The statistics plugin looks for messages sent to particular destinations.

Query running broker statistics

To query the running statistics of the message broker, the client sends an empty message to a Destination named ActiveMQ.Statistics.Broker, and sets the replyto field with the Destination you want to receive the result on. The statistics plugin will send a  MapMessage filled with the statistics for the running ActiveMQ broker.

Source code

program DestStatistics;

  Requires ActiveMQ 5.3 or higher
  To configure ActiveMQ to use the statistics plugin, add the following to the ActiveMQ XML configuration:

  DestStatistics [destination]
  If no destination is specified, the program returns the broker statistics


  You can also use wildcards too, and receive a separate message for every destination matched.


  BTCommAdapterIndy, BTMessageTransformerXMLMapOmni,
  BTJMSInterfaces, BTJMSConnection, BTSessionIntf, BTSerialIntf,
  BTStompTypes, BTTypes,

  Connection: IConnection;
  Session: ISession;
  Producer: IMessageProducer;
  Consumer: IMessageConsumer;
  Destination, ReplyQueue: IQueue;
  JMSMessage: ITextMessage;
  Reply: IMapMessage;
  MapNames: PMStrings;
  I: Integer;
  Key: string;

  Connection := TBTJMSConnection.MakeConnection;
      // Create and assign the message transformer
      SetTransformer(Connection, TBTMessageTransformerXMLMapOmni.Create(nil));

      Session := Connection.CreateSession(False, amAutoAcknowledge);

      // listen on reply queue
      ReplyQueue := Session.CreateQueue('Habari' + '?' +
      Consumer := Session.CreateConsumer(ReplyQueue);

      // create the pseudo destination
      if ParamCount = 0 then
        Destination := Session.CreateQueue('ActiveMQ.Statistics.Broker');
        Destination := Session.CreateQueue('ActiveMQ.Statistics.Destination.' + ParamStr(1));

      // display destination name
      WriteLn('Request statistics for ' + Destination.QueueName + ' ...');

      // create the message and set reply queue name
      JMSMessage := Session.CreateTextMessage;
      JMSMessage.JMSReplyTo := ReplyQueue;
      Producer := Session.CreateProducer(Destination);

      // read the result message
      Reply := Consumer.Receive(1000) as IMapMessage;

      // list the map key/values
      while Assigned(Reply) do
        MapNames := Reply.GetMapNames;
        for I := 0 to Length(MapNames) - 1 do
          Key := MapNames[I];
          WriteLn(Key + '=' + Reply.GetString(Key));
        Reply := Consumer.Receive(1000) as IMapMessage;

      WriteLn('No more message on queue ' + ReplyQueue.QueueName);


      on E: Exception do

  WriteLn('Press any key');


Query Statistics for Apache ActiveMQ with Delphi

Apache ActiveMQ 5.9.1 released

Apache ActiveMQ 5.9.1 resolves more than 120 issues, mostly bug fixes and improvements. It has the following new features:

  • Replicated LevelDB Store for shared nothing Master/Slave.
  • Runtime Configuration
  • Hawtio web console
  • Generic JMS XA connection pool in activemq-jms-pool module (has no ActiveMQ dependency)
  • MQTT over WebSockets support
  • broker Apache Camel component
  • Broker auto-restart upon losing master status
  • AMQP Hardening
  • LevelDB Hardening


A Delphi and Free Pascal client library is available from Habarisoft.


ActiveMQ Apollo 1.7 open source message broker released

The Apache ActiveMQ Project announced the availability of Apollo 1.7, a new open source message broker.

ActiveMQ Apollo is a faster, more reliable, easier to maintain messaging broker built from the foundations of the original ActiveMQ. It accomplishes this using a radically different threading and message dispatching architecture. Like ActiveMQ, Apollo is a multi-protocol broker and supports STOMP, AMQP, MQTT, Openwire, SSL, and WebSockets.


Client libraries are available for many programming languages. Habarisoft offers client libraries for Delphi and Free Pascal.

Habari Client for Apollo

Java EE 7 reference implementation GlassFish 4 released

GlassFish 4 – the first Java EE 7 application server – has been released. It is open source and available for download here – in two versions (Full Java EE platform and the Java EE Web Profile with reduced resource footprint) for Windows, Solaris, Linux and OS X.

New features include standardized API support for the WebSocket (JSR 356) and JSON (JSR 353) specifications, HTML5 support in the JavaServer Faces version 2.2, JMS 2.0, a Batch processing API (JSR 352), Concurrency support, and more. See also: GlassFish 4 Brings Java EE 7

Delphi and Free Pascal applications can be integrated in GlassFish (Full Java EE platform) web applications and web services using the Habari Client libraries from Habarisoft, which provide direct communication with the Open Message Queue (Open MQ) message broker, which is the default JMS provider in GlassFish 3 and 4.

Habari Client for OpenMQ