mirror of https://github.com/apache/activemq.git
[AMQ-8043] Do not override JMSXUserID when message comes across network connector
(cherry picked from commit bec734a133
)
This commit is contained in:
parent
ec6db10c7e
commit
7295bd85a5
|
@ -37,6 +37,10 @@ public class UserIDBroker extends BrokerFilter {
|
||||||
|
|
||||||
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
|
public void send(ProducerBrokerExchange producerExchange, Message messageSend) throws Exception {
|
||||||
final ConnectionContext context = producerExchange.getConnectionContext();
|
final ConnectionContext context = producerExchange.getConnectionContext();
|
||||||
|
if(context.isNetworkConnection() && messageSend.getUserID() != null) {
|
||||||
|
super.send(producerExchange, messageSend);
|
||||||
|
return;
|
||||||
|
}
|
||||||
String userID = context.getUserName();
|
String userID = context.getUserName();
|
||||||
if (isUseAuthenticatePrincipal()) {
|
if (isUseAuthenticatePrincipal()) {
|
||||||
SecurityContext securityContext = context.getSecurityContext();
|
SecurityContext securityContext = context.getSecurityContext();
|
||||||
|
|
Loading…
Reference in New Issue