Skip to content

Commit

Permalink
Addressing comments from Robbie trying to equalize the methods
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Dec 19, 2024
1 parent fb5e346 commit d073f53
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,11 @@ private void expire(final Transaction tx, final MessageReference ref, final Serv
Bindings bindingList = postOffice.lookupBindingsForAddress(expiryAddress);

if (bindingList == null || bindingList.getBindings().isEmpty()) {
ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress);
if (!printErrorExpiring) {
// print this only once
ActiveMQServerLogger.LOGGER.errorExpiringReferencesNoBindings(expiryAddress);
printErrorExpiring = true;
}
acknowledge(tx, ref, AckReason.EXPIRED, null, delivering);
} else {
move(tx, expiryAddress, null, ref, false, AckReason.EXPIRED, consumer, null, delivering);
Expand All @@ -2171,6 +2175,9 @@ private void expire(final Transaction tx, final MessageReference ref, final Serv

if (server != null && server.hasBrokerMessagePlugins()) {
if (tx == null) {
// potentially auto-delete this queue if this expired the last message
refCountForConsumers.check();

server.callBrokerMessagePlugins(plugin -> plugin.messageExpired(ref, settingsToUse.getExpiryAddress(), consumer));
} else {
ExpiryLogger expiryLogger = (ExpiryLogger) tx.getProperty(TransactionPropertyIndexes.EXPIRY_LOGGER);
Expand Down

0 comments on commit d073f53

Please sign in to comment.