Skip to content

Commit 29b65c0

Browse files
authored
Merge pull request #45 from epam/feature/optional-h-feed
Fixed NPE if H feed is absent in cfg. Changed examples according to autocerf cfg
2 parents 0d9c845 + 1adb446 commit 29b65c0

File tree

11 files changed

+10351
-18393
lines changed

11 files changed

+10351
-18393
lines changed

mbp-only/src/test/java/com/epam/cme/mdp3/test/Main.java

+11-6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
import java.util.*;
2222
import java.util.concurrent.atomic.AtomicLong;
2323

24+
import static com.epam.cme.mdp3.MdConstants.SECURITY_ID;
25+
import static com.epam.cme.mdp3.mktdata.MdConstants.RPT_SEQ_NUM;
26+
2427
public class Main {
2528
private static final Logger logger = LoggerFactory.getLogger(Main.class);
2629
private static AtomicLong prcdSeqNum = new AtomicLong(0);
@@ -83,14 +86,14 @@ public int onSecurityDefinition(final String channelId, final MdpMessage mdpMess
8386

8487
@Override
8588
public void onIncrementalRefresh(final String channelId, final short matchEventIndicator, int securityId, String secDesc, long msgSeqNum, final FieldSet incrRefreshEntry) {
86-
/*logger.info("[{}] onIncrementalRefresh: ChannelId: {}, SecurityId: {}-{}. RptSeqNum(83): {}",
87-
msgSeqNum, channelId, securityId, secDesc, incrRefreshEntry.getUInt32(RPT_SEQ_NUM));*/
89+
logger.info("[{}] onIncrementalRefresh: ChannelId: {}, SecurityId: {}-{}. RptSeqNum(83): {}",
90+
msgSeqNum, channelId, securityId, secDesc, incrRefreshEntry.getUInt32(RPT_SEQ_NUM));
8891
}
8992

9093
@Override
9194
public void onSnapshotFullRefresh(final String channelId, String secDesc, final MdpMessage snptMessage) {
92-
/*logger.info("onFullRefresh: ChannelId: {}, SecurityId: {}-{}. RptSeqNum(83): {}",
93-
channelId, snptMessage.getInt32(SECURITY_ID), secDesc, snptMessage.getUInt32(RPT_SEQ_NUM));*/
95+
logger.info("onFullRefresh: ChannelId: {}, SecurityId: {}-{}. RptSeqNum(83): {}",
96+
channelId, snptMessage.getInt32(SECURITY_ID), secDesc, snptMessage.getUInt32(RPT_SEQ_NUM));
9497
}
9598

9699
@Override
@@ -134,14 +137,16 @@ public static void main(String args[]) {
134137
// # 342 for YM
135138
// # 344 for ZB, ZN, ZF
136139
final Map<String, List<String>> channelInfos = new HashMap<>();
137-
defineChannel(channelInfos, "310", "ES");
140+
defineChannel(channelInfos, "901", "4$");
141+
142+
/*defineChannel(channelInfos, "310", "ES");
138143
defineChannel(channelInfos, "314", "6A", "6B", "6J", "6S");
139144
defineChannel(channelInfos, "318", "NQ");
140145
defineChannel(channelInfos, "382", "CL");
141146
defineChannel(channelInfos, "360", "HG", "GC", "SI");
142147
defineChannel(channelInfos, "320", "6C", "6E", "6M", "6N");
143148
defineChannel(channelInfos, "342", "YM");
144-
defineChannel(channelInfos, "344", "ZB", "ZN", "ZF");
149+
defineChannel(channelInfos, "344", "ZB", "ZN", "ZF");*/
145150

146151
final Map<String, Set<InstrumentInfo>> resolvedInstruments = new HashMap<>();
147152
channelInfos.forEach((s, groups) -> resolvedInstruments.put(s, new ChannelHelper().resolveInstruments(s, groups, null)));

mbp-only/src/test/java/com/epam/cme/mdp3/test/PrintAllSecuritiesTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public int onSecurityDefinition(final String channelId, final MdpMessage mdpMess
7676

7777
public static void main(String args[]) {
7878
try {
79-
final MdpChannel mdpChannel = new MdpChannelBuilder("344",
79+
final MdpChannel mdpChannel = new MdpChannelBuilder("901",
8080
Main.class.getResource("/config.xml").toURI(),
8181
Main.class.getResource("/templates_FixBinary.xml").toURI())
8282
//.setNetworkInterface(FeedType.N, Feed.A, "172.17.94.44")

0 commit comments

Comments
 (0)