Re: Stop Thread / Stop Listening

2007-10-26 Thread Timothy Bish
You need to get then out of SVN. See this page for accessing the code. http://activemq.apache.org/cms/source.html The code is in these folders https://svn.apache.org/repos/asf/activemq/activemq-cpp/trunk/src/examples/consumers/ https://svn.apache.org/repos/asf/activemq/activemq-cpp/trunk/src/exam

Re: Stop Thread / Stop Listening

2007-10-26 Thread mrh
I can't seem to find the link to the examples... would you mind posting it here? Thanks, mrh -- View this message in context: http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13432796 Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Stop Thread / Stop Listening

2007-10-26 Thread Timothy Bish
Sure thing. I've added a SimpleAsyncConsumer and SimplProducer examples to the trunk of ActiveMQ-CPP. You can look at these to see example of each in separate apps. Regards Tim On Fri, 2007-10-26 at 09:11 -0700, mrh wrote: > That is exactly what I needed to know. I misunderstood what the > do

Re: Stop Thread / Stop Listening

2007-10-26 Thread mrh
correctly, you can pass in a number of milliseconds that >> it >> > is >> > to wait for a message or a number that it will count down to as >> messages >> > are >> > received. With this structure, is it possible to asychronously receive >> &

Re: Stop Thread / Stop Listening

2007-10-26 Thread Timothy Bish
All you need to do is close the consuer, i.e. myConsumer.close() and it won't receive any more messages. That is if you only want to stop that consumer. Otherwise if you are shutting down the app then close and delete everything. Regards Tim. On Fri, 2007-10-26 at 07:51 -0700, mrh wrote: > In o

Re: Stop Thread / Stop Listening

2007-10-26 Thread mrh
possible to asychronously receive >> messages (using the onMessage function to process them) but stop the >> listener from the outside? Say, from an outside thread? >> >> Thanks, >> mrh > > -- View this message in context: http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13428693 Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Stop Thread / Stop Listening

2007-10-26 Thread Timothy Bish
When you use a MessageListener that listener is notified in a thread context other than the main thread. So in you client app you can set a MessageListener and then it will receive messages until you kill the app, so you can just have the main waiting on a cin.get() and it will process message unt

Re: Stop Thread / Stop Listening

2007-10-26 Thread mrh
sages (using the onMessage function to process them) but stop the > listener from the outside? Say, from an outside thread? > > Thanks, > mrh -- View this message in context: http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13428588 Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Stop Thread / Stop Listening

2007-10-26 Thread Timothy Bish
I'm not really sure what you are asking. The CountDownLatch is used specifically in our example to control the consumer and make that it doesn't wait forever for messages and it stops as soon as it gets all the messages we told it to. This happens when the run method in the consumer class finishe

Re: Stop Thread / Stop Listening

2007-10-26 Thread mrh
ly receive messages (using the onMessage function to process them) but stop the listener from the outside? Say, from an outside thread? Thanks, mrh -- View this message in context: http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13427708 Sent from the ActiveMQ - User ma

Re: Stop Thread / Stop Listening

2007-10-25 Thread Nathan Mittler
d shutdown > the listener thread when the user types "quit" or "exit"? > > Thanks, > mrh > -- > View this message in context: > http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13415697 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >

Stop Thread / Stop Listening

2007-10-25 Thread mrh
;exit"? Thanks, mrh -- View this message in context: http://www.nabble.com/Stop-Thread---Stop-Listening-tf4693571s2354.html#a13415697 Sent from the ActiveMQ - User mailing list archive at Nabble.com.