Discover ActiveMQ brokers with Delphi XE4 and Indy 10.6

This article shows how Delphi can use IP multicast to discover running Apache ActiveMQ message brokers in the local network. The code has been tested with Internet Direct (Indy) 10.6, which is the version included in Delphi XE4, and Apache ActiveMQ 5.8, which is the current release of the open source message broker.

With the code below, a Delphi application can list all ActiveMQ brokers, see their status, and get their IP address. This allows for dynamic configuration of client applications (built for example with Habari Client for ActiveMQ), where systems do not need to know the location of message brokers. It also allows automatic handling of broker failures or maintenance windows without intervention.

Example output

The output shows that a broker was found, running on the computer ‘my-PC’. The URL part indicates that the broker provides a connector for the OpenWire protocol on port 61616.

Waiting for broker discovery messages ...
Brokers found:
default.ActiveMQ-4.alive.%localhost%tcp://my-PC:61616

Continue reading

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

RPC with Delphi server and Java client using RabbitMQ (part 2 of 2)

This article shows the code for a Delphi server which receives a RPC call message from the inbound RabbitMQ request queue, and sends the response message back to the Java client. It is the mirror code for the previous article.

Continue reading

RPC with Delphi client and Java server using RabbitMQ (part 1 of 2)

The RabbitMQ online tutorial Remote procedure call (RPC) – using the Java client demonstrates how RPC can be implemented between a Java client and a Java server process, communicating over the RabbitMQ open source message broker.

But access to the RPC server process is not limited to Java applications – Delphi and Free Pascal applications using the Habari Client for RabbitMQ library can invoke the server process method too.

This article shows the code for a Delphi client which sends a RPC call message to the inbound RabbitMQ request queue, and receives the response message over a temporary queue, which exists only for the duration of the connection.

Continue reading

Habari Client for HornetQ 2.0 released

April 2, 2013 – Habarisoft is pleased to announce release 2.0 of Habari Client for HornetQ. HornetQ is an open source project from the JBoss Community to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system. HornetQ is the default Java Message Service (JMS) provider in JBoss Application Server, but can also used stand-alone.

This library provides Delphi and Free Pascal developers access to production-ready and industry standard based cross-platform application integration, using the peer-to-peer or the publish/subscribe communication model.

Continue reading

Habari Client for ActiveMQ 3.3 released

December 18, 2012 – Habarisoft is pleased to announce version 3.3 of Habari Client for ActiveMQ, a library which provides access to the Apache ActiveMQ open source message broker. ActiveMQ is also the default Java Message Service (JMS) provider in the open source Java EE server Apache Geronimo.
Habari Client Libraries

Home page:
http://www.habarisoft.com/habari_activemq.html

Documentation (PDF):
http://www.habarisoft.com/download/HabariActiveMQGettingStarted.pdf

API documentation (HTML):
http://www.habarisoft.com/habari_activemq/3.3/docs/api

Habari Client libraries provide access to production-ready and industry standard based cross-platform application integration, using the peer-to-peer or the publish/subscribe communication model. They are available for the open source message brokers ActiveMQ, Apollo, HornetQ, OpenMQ and RabbitMQ.

Habari Client for HornetQ 1.9 released

December 18, 2012 – Habarisoft is pleased to announce release 1.9 of Habari Client for HornetQ. HornetQ is an open source project from the JBoss Community to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system. HornetQ is the default Java Message Service (JMS) provider in JBoss Application Server, but can also used stand-alone.

Habari Client libraries provide access to production-ready and industry standard based cross-platform application integration, using the peer-to-peer or the publish/subscribe communication model.

New in version 1.9:

  • tested with HornetQ 2.3.0.Beta2 (released November 22, 2012)
  • support for configuration parameters in broker URLs, like failover://(stomp://broker1:port?param1=a,stomp://broker2:port?param2=b)?reconnectParam=value&…
  • tested with revision 4889 of Indy 10.5.9
  • added documentation on “How do I use synchronous Receive from multiple destinations?”, “ISAPI modules” and “GUI application detection using System.IsConsole” in the “Limitations” chapter
  • message size limit for text messages is MaxInt octets, the indy.maxlinelength connection URL parameter introduced in version 3.2 is no longer required
  • the library no longer configures extended RTTI (fixed in patch release 1.8.2)
  • Synapse: fixed constant 200 ms timeout bug (fixed in patch release 1.8.1)

Free “RabbitMQ Fundamentals” Course

SpringSource has released a free 2.5 hour eLearning training called vFabric RabbitMQ Fundamentals. This 2.5 hour eLearning training introduces you to the RabbitMQ product, why people use messaging, and how RabbitMQ high availability and clustering works. The training consists of five modules:

  • Module 1: Introduction to Messaging and AMQP
  • Module 2: RabbitMQ Product Presentation
  • Module 3: RabbitMQ Development
  • Module 4: RabbitMQ High Availability and Clustering
  • Module 5: RabbitMQ Advance Development

DataSnap speed and stability tests

Roberto Schneiders published and discussed test results for a REST application implemented with the frameworks DataSnap, mORMot, Jersey/Grizzly, ASP.NET WCF and Node.js: DataSnap analysis based on Speed & Stability tests. All the source code of the servers, as well as the binaries and the JMeter test plans are available for download at https://github.com/RobertoSchneiders/DataSnap_REST_Test.

Update: Indy HTTP server tests with pretty good results

To see wether Indy or DataSnap is the bottleneck, I ran a single-threaded JMeter test of the Indy HTTP server on a quite slow system (Mobile Core2 Duo @ 2.1 GHz), with HTTP 1.1 keep-alive enabled. The average throughput was 320 requests/second, with zero (0) % HTTP errors. The CPU load was around 40%, Client and server where running on the same system. In the tests described above, DataSnap with Indy as HTTP transport reached 62 requests/second on a Core i5 750 with 4 x 2,67 GHz system. With 50 threads, throughput reached more than 1.400 requests/second (over 1 million requests), 50% CPU load and 3 MB RAM usage.

The server application was the BasicDemo (a simple ‘Hello world!’) web application implemented with the Habari Web Components, which are a layer on top of Indy HTTP server components.