|
21 | 21 | import java.util.*;
|
22 | 22 | import java.util.concurrent.atomic.AtomicLong;
|
23 | 23 |
|
| 24 | +import static com.epam.cme.mdp3.MdConstants.SECURITY_ID; |
| 25 | +import static com.epam.cme.mdp3.mktdata.MdConstants.RPT_SEQ_NUM; |
| 26 | + |
24 | 27 | public class Main {
|
25 | 28 | private static final Logger logger = LoggerFactory.getLogger(Main.class);
|
26 | 29 | private static AtomicLong prcdSeqNum = new AtomicLong(0);
|
@@ -83,14 +86,14 @@ public int onSecurityDefinition(final String channelId, final MdpMessage mdpMess
|
83 | 86 |
|
84 | 87 | @Override
|
85 | 88 | 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)); |
88 | 91 | }
|
89 | 92 |
|
90 | 93 | @Override
|
91 | 94 | 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)); |
94 | 97 | }
|
95 | 98 |
|
96 | 99 | @Override
|
@@ -134,14 +137,16 @@ public static void main(String args[]) {
|
134 | 137 | // # 342 for YM
|
135 | 138 | // # 344 for ZB, ZN, ZF
|
136 | 139 | final Map<String, List<String>> channelInfos = new HashMap<>();
|
137 |
| - defineChannel(channelInfos, "310", "ES"); |
| 140 | + defineChannel(channelInfos, "901", "4$"); |
| 141 | + |
| 142 | + /*defineChannel(channelInfos, "310", "ES"); |
138 | 143 | defineChannel(channelInfos, "314", "6A", "6B", "6J", "6S");
|
139 | 144 | defineChannel(channelInfos, "318", "NQ");
|
140 | 145 | defineChannel(channelInfos, "382", "CL");
|
141 | 146 | defineChannel(channelInfos, "360", "HG", "GC", "SI");
|
142 | 147 | defineChannel(channelInfos, "320", "6C", "6E", "6M", "6N");
|
143 | 148 | defineChannel(channelInfos, "342", "YM");
|
144 |
| - defineChannel(channelInfos, "344", "ZB", "ZN", "ZF"); |
| 149 | + defineChannel(channelInfos, "344", "ZB", "ZN", "ZF");*/ |
145 | 150 |
|
146 | 151 | final Map<String, Set<InstrumentInfo>> resolvedInstruments = new HashMap<>();
|
147 | 152 | channelInfos.forEach((s, groups) -> resolvedInstruments.put(s, new ChannelHelper().resolveInstruments(s, groups, null)));
|
|
0 commit comments