It seems that InterestRegistrationListener.unregisterInterest is not called at all upon client disconnect/durable client expiration. On the other hand, InterestRegistrationListener.registerInterest is called no problem when one does server side ClientSession.registerInterest. Seems like a bug. I can see the alert about durable client expiration, but no notifications happen on the listener.
I have reproduced the same behavior as well, and will file a bug on it.
Another question: is there a way in the API to be notified of ClientSession termination?
There is a way to be notified when a client goes away, which is not exactly the same, but may be of help? BridgeMembershipListener callback interface has methods that are called when a member crashes, joins, or leaves. All are passed a BridgeMembershipEvent which has an isClient method that can be used to see if the member is a client. If so, you can call event.getMember().getDurableClientAttributes() on it, and if you get an attributes object, then you have a durable client member event, and you have access to the durable client ID from those attributes.
Hope this helps.