Version 10.2 of the Habari STOMP Client libraries moves two settings that used to require a recompile into ordinary properties on the connection, and fixes two defects that could stall or corrupt a connection at run time. As always, the same code works against all four supported brokers.

New

  • New: The maximum length of a STOMP command or header line can now be set per connection at run time. Cast the connection to IMaxLineLength (unit BTCommInterfaces) and assign MaxLineLength before calling Connection.Start; setting it on a started connection raises an EMQException. The value is in bytes; 0 (the default) keeps the networking library’s own limit. This is the setting to reach for when a broker sends a large authentication token, a long selector or bulky routing metadata and Indy raises EIdReadLnMaxLineLengthExceeded. Experimental, and applied by the Internet Direct (Indy) adapter only — Synapse and mORMot2 accept the value but ignore it.
  • New: The failover:(uri1,uri2,...) transport can be switched on from code. Cast the connection to IFailoverProtocol (unit BTMgmtInterfaces) and set EnableFailoverProtocol := True after creating the connection and before starting it. With the property left at its default False, a failover: URL still raises an “Unsupported Protocol” exception on connect, and the property cannot be changed once the connection is running.

Improved

  • Improved: Applications that compile with HABARI_LOGGING now get a compiler message confirming that logging is built in, and the slf4p version in use is written to the log at start-up.

Fixed

  • Fixed: With the mORMot2 communication adapter, Consumer.Receive(timeout) never returned when no frame arrived — the read blocked indefinitely instead of honouring the time-out. Receives, heart-beat reads and body reads are now all bounded by the time-out.
  • Fixed: TBTStompClient.StompConnect now resets the negotiated protocol version before the CONNECT frame is built. Previously, reconnecting on an existing client kept the version negotiated in the earlier session, so header values containing a backslash were escaped in the CONNECT frame.

Deprecated

  • Deprecated: HABARI_X_MAXLINELENGTH. The compiler now emits a warning when it is set. Remove the define from the project options and assign (Connection as IMaxLineLength).MaxLineLength instead.
  • Deprecated: HABARI_ENABLE_FAILOVER_PROTOCOL. The define still works as a compatibility opt-in — while it is set, every connection starts with EnableFailoverProtocol already True and the compiler emits a hint. Remove it from the project options and set the property in code instead.

There are no breaking changes in version 10.2: both deprecated defines continue to behave as before, so existing projects compile and run unchanged.

This release may first be published as 10.2.RC1; the release candidate is feature-complete and the final 10.2 will follow.

The new release versions are:

  • Habari STOMP Client for ActiveMQ, version 10.2 (tested with ActiveMQ version 6.3.1)
  • Habari STOMP Client for Artemis, version 10.2
  • Habari STOMP Client for OpenMQ, version 10.2
  • Habari STOMP Client for RabbitMQ, version 10.2

With Habari STOMP Client libraries, Delphi and Free Pascal developers can take advantage of message broker technology, connecting clients using the peer-to-peer or the publish and subscribe communication model.