mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3193 - implement equals for indirect message ref, so remove from pendingdispatch will work on moveMessages
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1075864 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
462efdb9de
commit
d8fd5330a4
|
@ -72,6 +72,17 @@ public class IndirectMessageReference implements QueueMessageReference {
|
|||
return "Message " + message.getMessageId() + " dropped=" + dropped + " acked=" + acked + " locked=" + (lockOwner != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return this == obj || (obj instanceof IndirectMessageReference &&
|
||||
message.getMessageId().equals(((IndirectMessageReference)obj).getMessage().getMessageId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return message.hashCode();
|
||||
}
|
||||
|
||||
public void incrementRedeliveryCounter() {
|
||||
message.incrementRedeliveryCounter();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue