Skip to content

Conversation

@BewareMyPower
Copy link
Owner

Motivation

There are a lot of duplicated code in
PersistentAcknowledgmentsGroupingTracker caused by the check for whether the ACK receipt is supported. The only difference is that the read write lock will be used and then currentIndividualAckFuture or currentCumulativeAckFuture will be returned.

In addition, the validationError argument in
newMessageAckCommandAndWrite is never used.

Modifications

Move the isAckReceiptEnabled into ConsumerImpl and add two methods acquireReadLock/acquireWriteLock to acquire the read or write lock if ACK receipt is enabled.

Remove the validationError argument.

…tracker

### Motivation

There are a lot of duplicated code in
PersistentAcknowledgmentsGroupingTracker caused by the check for whether
the ACK receipt is supported. The only difference is that the read write
lock will be used and then `currentIndividualAckFuture` or
`currentCumulativeAckFuture` will be returned.

In addition, the `validationError` argument in
`newMessageAckCommandAndWrite` is never used.

### Modifications

Move the `isAckReceiptEnabled` into `ConsumerImpl` and add two methods
`acquireReadLock`/`acquireWriteLock` to acquire the read or write lock
if ACK receipt is enabled.

Remove the `validationError` argument.
@BewareMyPower BewareMyPower deleted the bewaremypower/ack-tracker-lock-enh branch November 24, 2022 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant