Could you write a sample main that illustrates the problem?  Perhaps you
could put your two consumers and two producers in the same app, but each
using their own connection?  You could use the AMQCPP concurrent package to
help simplify the threading of the producers.

Also, what is your environment?
- broker version?
- OS/compiler?

Thanks!

On 1/26/07, masterov <[EMAIL PROTECTED]> wrote:



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