Hi All,

I am having a activemq publisher which publishes 1000s of messages per
second. Its working fine, until I place an subscriber on that topic.

When the subscriber is put on the topic, it works fine for first 70000-80000
messages but after that the publisher stops publishing on the topic. If i
remove the subscriber, the publisher starts publishing message on the topic
and works fine.

Please find below the code snippet from my subscriber,

string brokerURI = "failover:(tcp://" + sBrokerNPort +
")?wireFormat=openwire&keepAlive=true&wireFormat.maxInactivityDuration=0";

oReq = new clAMQ(brokerURI, sDataRequestQ, 1);
oReq->connect();
oReq->createConsumer();

void onMessage(void *msg) {

        string symbol = clAMQ::getStringPropertyFromMessage(msg,"S");
        string timestamp = clAMQ::getStringPropertyFromMessage(msg,"T");
        double price = clAMQ::getDoubleFromMapMessage(msg,"P");
        long size = clAMQ::getLongFromMapMessage(msg,"VS");

        cout << "msg : " << symbol << price << endl;

       clAMQ::acknowledgeMsg(msg);
}

What could be the reason for this.

Thanks,
Manu




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Publisher-stops-publishing-when-a-subscriber-is-attached-to-that-topic-tp3654216p3654216.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to