Unsubscribre from previous snapshot plus update request
Created at 12 Oct 2016, 17:52
DA
Unsubscribre from previous snapshot plus update request
12 Oct 2016, 17:52
I am using the following code to try to unsubscribe from a previous snapshot plus update request (using quickfix/j), but the engine keeps disconnecting me without receiving response form the server. Is the server working correctly? Is it necessary to unsubscribe before closing the session with a logout message?
quickfix.fix44.MarketDataRequest message = new quickfix.fix44.MarketDataRequest (new MDReqID("REQUEST"+ nID), new SubscriptionRequestType(SubscriptionRequestType.DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST), new MarketDepth(1)); message.set(new MDUpdateType(1)); message.getHeader().setField(new StringField(50, "QUOTE")); quickfix.fix44.MarketDataRequest.NoMDEntryTypes noMDEntryTypes = new quickfix.fix44.MarketDataRequest.NoMDEntryTypes(); MDEntryType mdEntryType_bid = new MDEntryType('0'); noMDEntryTypes.set(mdEntryType_bid); message.addGroup(noMDEntryTypes); MDEntryType mdEntryType_offer = new MDEntryType('1'); noMDEntryTypes.set(mdEntryType_offer); message.addGroup(noMDEntryTypes); quickfix.fix44.MarketDataRequest.NoRelatedSym relatedSymbol = new quickfix.fix44.MarketDataRequest.NoRelatedSym(); relatedSymbol.set(new quickfix.fix44.component.Instrument(new Symbol("1"))); message.addGroup(relatedSymbol);