public void onMessage()

in mbp-with-mbo/src/main/java/com/epam/cme/mdp3/channel/LowLevelMdpChannel.java [365:389]


        public void onMessage(final MdpFeedContext feedContext, final MdpMessage secDefMsg) {
            final int subscriptionFlags = notifySecurityDefinitionListeners(secDefMsg);
            final int securityId = secDefMsg.getInt32(MdConstants.SECURITY_ID);
            if(logger.isDebugEnabled()) {
                logger.debug("Subscription flags for channel '{}' and instrument '{}' are '{}'", getId(), securityId, subscriptionFlags);
            }
            String secDesc = null;
            if(secDefMsg.getString(MdConstants.SEC_DESC_TAG, strValObj)) {
                secDesc = strValObj.getString();
            }
            if (MdEventFlags.hasMessage(subscriptionFlags)) {
                instrumentManager.registerSecurity(securityId, secDesc);
            } else {
                instrumentManager.updateSecDesc(securityId, secDesc);
            }
            if (msgCountDown.get() == PRCD_MSG_COUNT_NULL) {
                final int totalNumReports = getTotalReportNum(secDefMsg) * INSTRUMENT_CYCLES_MAX;
                this.msgCountDown.compareAndSet(PRCD_MSG_COUNT_NULL, totalNumReports);
            }
            final int msgLeft = msgCountDown.decrementAndGet();
            if (canStopInstrumentListening(msgLeft)) {
                stopFeed(FeedType.N, Feed.A);
                stopFeed(FeedType.N, Feed.B);
            }
        }