diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java index 2431ceddde..38f5dd78d0 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java @@ -210,7 +210,7 @@ public final class RoutingContextImpl implements RoutingContext { @Override public RoutingContext setRoutingType(RoutingType routingType) { - if (this.routingType == null || this.routingType != routingType) { + if (this.routingType == null && routingType != null || this.routingType != routingType) { this.clear(); } this.routingType = routingType;