This behavior is by design.
It has to be this way, if we want the SubscribeXXXX methods (and UnsubscribeXXXX, ChangeXXXXSubscription) return without waiting for results. And it is one of our design goals, which is derived from real use-cases. For example, users want to write things such as simple HMIs etc,, where switching screens involves subscribing/unsubscribing. If these methods have blocked until the operation gives some results (for all items involved), the user experience would be bad.
And we would have to device some ADDITIONAL way of passing back to you the "first" result or waiting for your code, because the notifications can be fired at any time, and therefore even if we have returned from the call and gave back the handles, we would STILL not know for sure whether your code has proceeded to the point where it has properly stored/processed these handles.
But it is easy to overcome. Not only that, the right way of doing it is easier and safer to write, and more efficient to execute. Here is what you should do:
1. Do not use the handles returned by SubscribeXXXX for anything else than for calls to UnsubscribeXXXX or ChangeXXXXSubscription.
2. Instead, identify the items yourself. To do that, use a State argument that is passed BY YOU to the SubscribeXXXX method (depending on the overload, it may one of the method argument, or it may be encapsulated inside an "arguments" object). This way you can define the association BEFORE you even call SubscribeXXXX, and it can be an object of your wish. You will receive this object in a State argument with each notification, and you will already know what it is, and you will be able to directly use it, without looking up the handle in some kind of map or dictionary => better performance. The only thing you may need is to typecast if, because State is an 'object', but in your code it will be something more specific. In many cases, there is already something in your code that can be logically used as the State object - for example, in many UI apps, it may be directly a reference to a control on the form that should be updated by that notification.
Best regards