tabish121 wrote:
> 
> Are these all in the same app?  What's keeping the consumers around
> longer enough to receive all those messages?  
> 
> Sample code?
> 

1. different apps
2. while (1) sleep(10);
3. here ya go:

         // Create a ConnectionFactory
         ActiveMQConnectionFactory* connectionFactory = new
ActiveMQConnectionFactory(url);

         // Create a Connection
         connection = connectionFactory->createConnection();
         connection->start();

         // Create a Session
         session = connection->createSession( Session::AUTO_ACKNOWLEDGE );

         // Create the control topic
         control = session->createTopic( "DEV.LOG" );

         // Create a MessageConsumer from the Session to the Topic
         consumer = session->createConsumer( control );
         consumer->setMessageListener( this );

and onMessage simply does: count++;

-- 
View this message in context: 
http://www.nabble.com/activemq-cpp-missing-messages-tf3124967.html#a8658968
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to