How to unsubscribe market data?

Imported from previous forum

[ original email was from Henrik Johansson - henrik.johansson@neonet.biz ]
When setting up a subscription of market data, the MarketDataRequest (35=V) is issued. The request has a mandatory MDReqID(Tag 262) which shall be unique except when unsubscribing. The MDReqID is echoed back on all corresonding messages.

When unsubscribing market data, a MarketDataRequest with SubscriptionRequestType=2 (Unsubscribe) shall be issued. I wonder what the key is for the ‘unsubscribe request’. Either the MDReqID can be used or one can use the InstrmtMDReqGrp group to derive what instruments that shall be unsubscribed. I assume that the intention is that the MDReqID shall be the key.

On the other hand, InstrmtMDReqGrp is mandatory in the message and needs to be set and can be used as key as well.

This generates an extra error scenario when the InstrmtMDReqGrp is not equal to to original message’s InstrmtMDReqGrp.