diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/UserIDBroker.java b/activemq-broker/src/main/java/org/apache/activemq/broker/UserIDBroker.java index 2d5dea5b15..56c432cf0a 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/UserIDBroker.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/UserIDBroker.java @@ -37,6 +37,10 @@ public class UserIDBroker extends BrokerFilter { public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception { final ConnectionContext context = producerExchange.getConnectionContext(); + if(context.isNetworkConnection() && messageSend.getUserID() != null) { + super.send(producerExchange, messageSend); + return; + } String userID = context.getUserName(); if (isUseAuthenticatePrincipal()) { SecurityContext securityContext = context.getSecurityContext();