Skip to main content

What’s New in Apache Pulsar 2.10.4

· 3 min read

The Apache Pulsar community releases version 2.10.4! 37 contributors provided improvements and bug fixes that delivered 12 commits. Thanks for all your contributions.

This blog walks through the most noteworthy changes. For the complete list, including all feature enhancements and bug fixes, check out the Pulsar 2.10.4 Release Notes.

Improve performance in Key_Shared subscriptions (PR-19167)

Issue

In earlier versions, Key_Shared subscriptions suffered from performance issues due to the lack of a ref count for sticky hash.

Resolution

A significant performance improvement has been made to the Key_Shared subscriptions by adding a ref count for sticky hash. This optimization reduces the time required to check if messages contain the hash from a given sticky hash set, resulting in improved performance and efficiency.

AbstractBatchedMetadataStore - Use AlreadyClosedException instead of IllegalStateException (PR-19284)

Issue

In earlier versions, when the broker was shutting down, the AbstractBatchedMetadataStore would complete pending operations with a generic IllegalStateException. However, code dependent on the MetadataStore usually expected instances of MetadataStoreException and might not react properly to this error.

Resolution

This PR improves the error handling during broker shutdown by completing pending operations with an AlreadyClosedException instead of IllegalStateException. This ensures that the dependent code responds more appropriately to the error, even if the broker is shutting down.

Fix open cursor with null-initialPosition, resulting in the earliest position (PR-18416)

Issue

In earlier versions, called ledger.openCursor("xxx", null) with a null initialPosition parameter would result in the cursor being set to the earliest position, causing unexpected behavior. The root cause of this issue was due to incorrect handling of the initialPosition in ManagedLedgerImpl.java.

Resolution

This PR fixes the issue by ensuring that the correct initial position is used when opening a cursor with a null initialPosition. The code now sets the cursor to the latest position, as expected.

Add isActive in ManagedCursorImpl (PR-19341)

Issue

In previous versions, when there were many concurrent subscriptions in a topic, broker performance would degrade due to many io-threads waiting for the lock, synchronized (activeCursors) while calling checkBackloggedCursors.

Resolution

This PR adds an isActive variable in ManagedCursorImpl to minimize the access to activeCursors in ManagedLedgerImpl, which reduces the contention on the lock and improves the broker performance with many concurrent subscriptions.

Support deleting partitioned topics with the keyword -partition- (PR-19230)

Issue

In earlier versions, although users could create partitioned topics using the client when partitioned type auto-creation was enabled, there was no support for deleting these partitioned topics.

Resolution

This PR adds support for deleting partitioned topics using the keyword -partition-, making it easier for users to manage their partitioned topics.

What’s Next?

If you are interested in learning more about Pulsar 2.10.4, you can download and try it out now!

For more information about the Apache Pulsar project and current progress, visit the Pulsar website, follow the project on Twitter @apache_pulsar, and join Pulsar Slack!