andytaylor commented on code in PR #4183:
URL: https://github.com/apache/activemq-artemis/pull/4183#discussion_r1039499737
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##########
@@ -2340,10 +2318,24 @@ public Pair<SimpleString, EnumSet<RoutingType>>
getAddressAndRoutingTypes(Simple
}
@Override
- public void addProducer(ServerProducer serverProducer) {
+ public void addProducer(ServerProducer serverProducer, String address) {
+ if (address == null) {
+ //this is ok as it will be an anonymous producer which we dont track
+ return;
+ }
serverProducer.setSessionID(getName());
- serverProducer.setConnectionID(getConnectionID().toString());
- producers.put(serverProducer.getID(), serverProducer);
+ serverProducer.setConnectionID(getConnectionID() != null ?
getConnectionID().toString() : null);
+ producers.put(address, serverProducer);
Review Comment:
Also we will no longer have to track queue deletion and remove producers.
For the legacy use case we still have the max producers to stop a DOS attack
and they are removed on session close anyway
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]