Monday, October 06, 2025

JGroups 5.5.0 released

I'm happy to announce the release of JGroups 5.5.0!

The most important changes / features are listed below. For a detailed list of all issues see [1].

 

Required Java version

The baseline for JGroups 5.5.0 is now Java 17. 

https://issues.redhat.com/browse/JGRP-2911 

 

Virtual threads are enabled by default

Where available (JDKs 21 and higher), virtual threads will be used instead of platform threads. This can be disabled by setting use_vthreads=false in the transport.

https://issues.redhat.com/browse/JGRP-2909 

 

New default bundler: PerDestinationBundler

Bundlers queue smaller messages to a given destination, until a (configurable) number of bytes have been accumulated, or no more messages are sent, and then pack them into a single message batch that is sent. 

On the receiver side, the batch is passed up and protocols remove messages from it when required.

TransferQueueBundler has been the bundler of choice for a long time (15+ years).

One problem with TransferQueueBundler is that it sends queued messages to different destinations in a single thread. If a destination is down or blocked by a firewall, then this would have blocked the entire sending, also affecting messages to different destinations.

PerDestinationBundler now has one queue per destination and one thread per queue sending messages to that destination. This means messages to other destinations are not blocked as in the example above.

Performance was measured to be equals or slightly better than TransferQueueBundler, see the links below.

Note that TransferQueueBundler can still be configured to be used instead, and it won't be removed any time soon.

https://issues.redhat.com/browse/JGRP-1997

https://issues.redhat.com/browse/JGRP-2896

https://issues.redhat.com/browse/JGRP-2883

https://issues.redhat.com/browse/JGRP-2915

https://issues.redhat.com/browse/JGRP-2916

  

New concurrent size-bounded queues

Created 2 new queues MPSC: ConcurrentLinkedBlockingQueue and ConcurrentBlockingRingBuffer. 

The former is based on ConcurrentLinkedQueue, but extends it with blocking semantics.

The latter is a ring buffer of a fixed size, with producers optionally blocking on a full queue (default: discard) and consumers optionally blocking on an empty queue.

Both implementations replace ArrayBlockingQueue, e.g. used by TransferQueueBundler / PerDestinationBundler).

ConcurrentBlockingRingBuffer: https://issues.redhat.com/browse/JGRP-2900

ConcurrentLinkedBlockingQueue: https://issues.redhat.com/browse/JGRP-2890 

Performance: https://issues.redhat.com/browse/JGRP-2907

https://issues.redhat.com/browse/JGRP-2679 

  

XML configuration can include other configurations

Frequently used configurations such as a TCP- or UDP-transport can be defined once, and included in different configurations. Inclusion overrides allow for overriding of selected attributes.

Example:

<config>
   <include file="${transport-config:tcp-default.xml}" 
            bundler.use_single_sender_thread="false"
            sock_conn_timeout="${conn-timeout:500}" />
   <MPING />
   <MERGE3 max_interval="30000"
           min_interval="${min:10000}"/>
   ...
</config> 

https://issues.redhat.com/browse/JGRP-2908 

https://issues.redhat.com/browse/JGRP-2918 

Documentation: http://www.jgroups.org/manual5/index.html#_configuration

 

JDBC_PING2: improved concurrent startup

When multiple members were started at the same time, oftentime members would form multiple subgroups, only to eventually be merged into a common single group. The JIRA below fixes this.

https://issues.redhat.com/browse/JGRP-2920

 

NAKACK4 blocks sender

In a special case, a sender could be blocked forever on sending because it was still expecting acks from a left member. This would go on until a new view was installed.

https://issues.redhat.com/browse/JGRP-2904 

  

NAKACK4 / UNICAST4: receivers can block 

This happened due to a refactoring which changed the semantics of message reception in these two protocols. Not an issue in most scenarios, but silently changing semantics is a no-go...

https://issues.redhat.com/browse/JGRP-2906 

 

New protocols SIZE, SIZE2

SIZE has been changed to now show the number of messages keyed by their length (number of bytes): https://issues.redhat.com/browse/JGRP-2893

SIZE2 creates buckets is size ranges and assigns messages to a bucket (by the length of a message). 

This allows for seeing messages distribution by length: https://issues.redhat.com/browse/JGRP-2895 

 

New keyword use-localhost for bind_addr

This keyword uses InetAddress.getLocalHost() as bind address.

https://issues.redhat.com/browse/JGRP-2897 

 

DNS_PING: support AAAA records 

This supports using DNS_PING with IPv6. 

https://issues.redhat.com/browse/JGRP-2769

 

TCPPING improvements 

TCPPING now includes the bind_addr of the transport if not already listed. This prevents the case where a valid bind address (e.g. 192.168.1.5) is available in the transport, but TCPPING's initial_hosts is 127.0.0.1[7800]

https://issues.redhat.com/browse/JGRP-2910 

  

(Slightly) faster serialization

Slightly faster serialization/deserialization of messages. In the order of nanoseconds, but if we send millions of messages, this might be seen. 

https://issues.redhat.com/browse/JGRP-2882 

 

TCP can bypass the send lock in some cases 

Minor performance improvement 

https://issues.redhat.com/browse/JGRP-2901 

 

JDBC_PING2: error when using custom addresses

https://issues.redhat.com/browse/JGRP-2887 

 

Enjoy! For questions please use the mailing list: [2].

  

[1]  https://issues.redhat.com/browse/JGRP-2939?jql=project%20%3D%20JGRP%20and%20fixVersion%20%3D%20%225.5.0%22

[2] https://groups.google.com/g/jgroups-dev

 

No comments:

Post a Comment