public void unsubscribe ( String clientID , String subscriptionName ) throws JMSException { String subscriberID = clientID + "-" + subscriptionName ; subscriptionsLock . writeLock ( ) . lock ( ) ; try { LocalTopicSubscription subscription = subscriptionMap . get ( subscriberID ) ; if ( subscription == null ) return ; if ( isConsumerRegistered ( subscriberID ) ) throw new FFMQException ( "Subscription " + subscriptionName + " is still in use" , "SUBSCRIPTION_STILL_IN_USE" ) ; subscriptionMap . remove ( subscriberID ) ; removeSubscription ( subscription ) ; } finally { subscriptionsLock . writeLock ( ) . unlock ( ) ; } }
Unsubscribe all durable consumers for a given client ID and subscription name