jbertram commented on code in PR #5597:
URL: https://github.com/apache/activemq-artemis/pull/5597#discussion_r2054472922


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##########
@@ -490,18 +490,25 @@ private void sendSessionNotification(final 
CoreNotificationType type) throws Exc
       if (server.getConfiguration().isSuppressSessionNotifications()) {
          return;
       }
-      final TypedProperties props = new TypedProperties();
-      if (this.getConnectionID() != null) {
-         props.putSimpleStringProperty(ManagementHelper.HDR_CONNECTION_NAME, 
SimpleString.of(this.getConnectionID().toString()));
-      }
-      props.putSimpleStringProperty(ManagementHelper.HDR_USER, 
SimpleString.of(this.getUsername()));
-      props.putSimpleStringProperty(ManagementHelper.HDR_SESSION_NAME, 
SimpleString.of(this.getName()));
-
-      props.putSimpleStringProperty(ManagementHelper.HDR_CLIENT_ID, 
SimpleString.of(this.remotingConnection.getClientID()));
-      props.putSimpleStringProperty(ManagementHelper.HDR_PROTOCOL_NAME, 
SimpleString.of(this.remotingConnection.getProtocolName()));
-      props.putSimpleStringProperty(ManagementHelper.HDR_ADDRESS, 
managementService.getManagementNotificationAddress());
-      props.putIntProperty(ManagementHelper.HDR_DISTANCE, 0);
-      managementService.sendNotification(new Notification(null, type, props));
+      // Send notification in a new thread to avoid blocking and potentially 
soft dead-locking during heavy session open/close
+      sessionExecutor.execute(() -> {

Review Comment:
   Good catch! I updated the code to account for this.



-- 
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: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to