activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler" <nathan.mitt...@gmail.com>
Subject Re: activemq-cpp missing messages
Date Sat, 27 Jan 2007 09:06:02 GMT
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 <alexei.masterov@us.icap.com> 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.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message