AnsweredAssumed Answered

A long delay occurred using MaprStreams occasionally

Question asked by eiwin on Dec 5, 2016
Latest reply on Dec 9, 2016 by maprcommunity

I am using Mapr 5.2 commodity converged data platform.

 

Just like mapr-streams-sample-programs-master, I changed a little. To produce one message per 5 second, normally the consumer can get the message very fast, within 150ms. But a long delay occurred occasionally. 5.x seconds passed until the consumer got the message. It seemed like that the former message stayed in the buffer, the new message with the old one were sent out together 5s later.

this is the produce send code:

    public void send(String strMsg){
        try{
            m_producer.send(new ProducerRecord<String, String>(
                    m_topic,
                    strMsg));
            m_producer.flush();
        }catch (Throwable throwable) {
            System.out.printf("%s", throwable.getStackTrace());
            m_producer.close();
        }
    }

 

Foe me, MaprStreams is used for realtime message transfer. The transfer time would be low-latency and exact.

Is there someone who can help me. I really appreciate it. Thanks a lot.

Outcomes