What happened to the replication queue?
Recently I saw an Infinispan user that was having issues using the replication queue, a clustering functionality that had been part of Infinispan since it’s first release. Looking at the latest Infinispan codebase I realised it wasn’t there any more, what happened to it?
The aim of the replication queue was to batch individual cache operations and send them as one to other nodes, rather than sending them each operation individually.
Over time we started considering whether the replication queue could be removed:
The replication queue was duplicating functionality: JGroups, which manages the group communication layer, already bundles messages and the network stack can do it too.
Using the replication queue was not more efficient because when the message is delivered in the remote node, the messages are processed sequentially. If processing first message blocks, the other commands are not processed until it finishes.
It can add complexity if messages with different order requirements come in same batch, e.g. no order, FIFO or total.
In essence, Infinispan’s replication queue was doing the same as JGroups' message bundler. Whereas JGroups' message bundler had been evolving and different options had been developed, Infinispan’s replication queue was still using same algorithm as in its first release.
So in Infinispan 8.2 the replication queue was deprecated and in 9.0 it was finally removed. If you ever find the need to batch your changes, configure JGroups' message bundler.
Get it, Use it, Ask us!We’re hard at work on new features, improvements and fixes, so watch this space for more announcements!
Please, download and test the latest release.
If you have questions, are experiencing a bug or want advice on using Infinispan, you can use StackOverflow. We will do our best to answer you as soon as we can.