INT-4564: ACMH: Fix erroneous error log
JIRA: https://jira.spring.io/browse/INT-4564
INT-4550 added an error log when multiple ACMHs were registered with the
same store; the error log logic was incorrect and the error was logged
when the first ACMH was registered.
(cherry picked from commit 9832f61d2a)
This commit is contained in:
committed by
Artem Bilan
parent
be6498008f
commit
7a2547f601
@@ -112,7 +112,7 @@ public abstract class AbstractMessageGroupStore extends AbstractBatchingMessageG
|
||||
this.expiryCallbacks.stream()
|
||||
.anyMatch(UniqueExpiryCallback.class::isInstance);
|
||||
|
||||
if (!uniqueExpiryCallbackPresent && this.logger.isErrorEnabled()) {
|
||||
if (uniqueExpiryCallbackPresent && this.logger.isErrorEnabled()) {
|
||||
this.logger.error("Only one instance of 'UniqueExpiryCallback' can be registered in the " +
|
||||
"'MessageGroupStore'. Use a separate 'MessageGroupStore' for each aggregator/resequencer.");
|
||||
}
|
||||
|
||||
@@ -348,6 +348,8 @@ public class AbstractCorrelatingMessageHandlerTests {
|
||||
}
|
||||
};
|
||||
handler.setMessageStore(messageStore);
|
||||
// test UniqueExpiryCallback error message
|
||||
// new AggregatingMessageHandler(new DefaultAggregatingMessageGroupProcessor()).setMessageStore(messageStore);
|
||||
handler.handleMessage(MessageBuilder.withPayload("foo")
|
||||
.setCorrelationId(1)
|
||||
.setSequenceNumber(1)
|
||||
|
||||
Reference in New Issue
Block a user