Skip to content

Commit

Permalink
AMQ-140273 Message expired failure when the destination doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseie authored and Charlie-chenchrl committed Jan 29, 2024
1 parent dd718ba commit 8584331
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.activemq.command.TransactionId;

public class ReplicaDestinationFilter extends DestinationFilter {

private final boolean nextIsComposite;
private final ReplicaSourceBroker sourceBroker;
private final ReplicaRoleManagementBroker roleManagementBroker;
Expand Down Expand Up @@ -55,6 +54,14 @@ public void send(ProducerBrokerExchange producerExchange, Message messageSend) t
}
}

@Override
public boolean canGC() {
if (ReplicaRole.source == roleManagementBroker.getRole()) {
return super.canGC();
}
return false;
}

private void replicateSend(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
final ConnectionContext connectionContext = producerExchange.getConnectionContext();
if (!sourceBroker.needToReplicateSend(connectionContext, messageSend)) {
Expand Down

0 comments on commit 8584331

Please sign in to comment.