/** * Check if the connection is pass through. * Pass through connection is a connection with null connector (Advisory topic connection) or embedded broker connection (connection string starts by vm://) * * @param context * @return */ private boolean isPassThroughConnection(ConnectionContext context) { if (context != null) { if (context.getConnector() == null || CONNECTOR_NAME_VM.equals(((TransportConnector) context.getConnector()).getName())) { return true; } // network connector if (context.getConnection().isNetworkConnection()) { return true; } } return false; }