Using non-durable queues on RabbitMQ

RabbitMQ supports durable and non-durable (‘transient’) queues. By default, a queue created using a STOMP client is durable, which means the queue will survive a broker restart (see AMQP 0-9-1 Model Explained). Non-durable queues on a RabbitMQ server may not be created using STOMP , but they may be accessed by STOMP clients.

Example code is now available here: Non-durable queue example for RabbitMQ 

Connect with WildFly 25 Final

Red Hat released the WildFly 25 Final application server earlier this month. If you want to integrate Delphi or Free Pascal applications with WildFly, you can follow the steps in this article to configure the embedded Apache ActiveMQ Artemis message broker in WildFly, and connect your applications with the message broker using a STOMP connection.

Blog post: Connect Delphi and Free Pascal applications with WildFly 25 Final

New Chat Demo

The upcoming version of Habari Client libraries includes an improved chat demo application. Screenshots and a summary of the major changes can be found here: New Chat Demo. Registered users may receive a preview version of the chat demo application.

Using Streams (x-stream-offset) with RabbitMQ

Streams are a new persistent and replicated data structure in RabbitMQ 3.9 which models an append-only log with non-destructive consumer semantics. The SUBSCRIBE frame supports a x-stream-offset header to specify the offset to start consuming from in a stream.

The upcoming version of Habari Client for RabbitMQ includes example code which consumes messages from a stream, starting at a random offset.

Context.Start;
QueueArgs := Format('x-queue-type=stream&x-stream-offset=offset=%d&prefetch-count=10', [AStreamOffset]);
Destination := Context.CreateQueue(AQueueName + '?' + QueueArgs);
Consumer := Context.CreateConsumer(Destination);
Writeln(Format('Reading %d messages from destination %s, starting at offset %d ...',
  [READ_COUNT, AQueueName, AStreamOffset]));
I := 1;
Msg := Consumer.Receive(100) as ITextMessage;
while Assigned(Msg) do
begin
  Msg.Acknowledge;
  WriteLn(Format('Message %d received and acknowledged, content="%s"', [I, Msg.Text]));
  Inc(I);
  if I > READ_COUNT then Exit;
 Msg := Consumer.Receive(100) as ITextMessage;
end

New message broker releases

  • ActiveMQ 5.16.3 (released 17 August 2021)
  • ActiveMQ Artemis 2.19.0 (released 18 October 2021)
  • RabbitMQ 3.9.8 (released 19 October 2021)

Further resources and demo applications

Home page: https://www.habarisoft.com/

About Habari Client libraries

habari_logo_2016

Habari 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.

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s