Re: How to limit queue depth by #msgs

2015-01-15 Thread artnaseef
OK, please see this jira ticket and vote for it! https://issues.apache.org/jira/browse/AMQ-5522 Please make comments in the ticket, or let me know, if any updates to the ticket are desired. -- View this message in context: http://activemq.2283324.n4.nabble.com/How-to-limit-queue-depth-by-msgs

Re: Consumer hanging after a producer fails for being inactive

2015-01-15 Thread artnaseef
Hmm, check the producer connections to the broker after the VPN restart using netstat. When the consumers appear to hang, do you see evidence on the broker that the producer messages are actually being received in the broker? For example, the QueueSize for the queue -- is it increasing over time?

Re: Consumer queues of virtual topic and the web console

2015-01-15 Thread artnaseef
Does this happen without the JMX modifications? That does sound odd. One question comes to mind - does the queue actually exist in the broker at the time of the message dispatch? Check the consumers - make sure they are active at the time the message is dispatched, and that the broker sees the c

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread artnaseef
How about the following instead? As Tim pointed out, the consumer close won't return until no more calls to onMessage are guaranteed. I believe that also means it won't return while onMessage() is actively being called. @Tim - can you confirm? If that's correct, the following should do the job

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread Steve Rice
Thanks. I considered the sleep idea and will probably go that route. Steve Rice -- View this message in context: http://activemq.2283324.n4.nabble.com/how-to-safely-delete-a-cms-MessageListener-object-tp4689939p4689997.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Consumer queues of virtual topic and the web console

2015-01-15 Thread krishy
We are using the stock ActiveMQ 5.10.0 configuration (with minor modifications for JMX). With this configuration we have run into a very strange issue every now and then with messages not being dispatched from the consumer queues of a virtual topic until we click 'browse' on the web console of that

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread Tim Bain
You could probably handle that problem in most cases by adding a flag that says whether onMessage() is currently running (increment on entry, decrement on exit) combined with a long enough sleep() call; it's a bit ham-fisted, but it should be good enough. Close the consumer (so you know that there

Re: How to send a struct via ActiveMQ CMS?

2015-01-15 Thread Tim Bain
It's also possible to serialize to XML via libraries such as LMX ( http://www.codalogic.com/lmx/lmx-c++-xml-data-binding-features.php), so JSON isn't the only option for serialization libraries you can reuse rather than write. And those libraries should have already handled byte ordering and other

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread Steve Rice
Thanks for the suggestions. I have a request-and-reply mechanism, where the reply arrives asynchronously to a temporary queue, and a consumer has been set up to listen for that reply sent to the temporary queue. At some point, after waiting awhile to receive the reply and still not getting it, th

Re: How to send a struct via ActiveMQ CMS?

2015-01-15 Thread artnaseef
This is really a C/C++ question - how to serialize/de-serialize data. There is no simple answer. Every time I've done any such thing in C/C++ (which was my focus area for >15 years from College on), I wrote a custom serializer/deserializer. If you want something easier to code, and are not overl

Re: Message is moved to DLQ without clear cause

2015-01-15 Thread artnaseef
Can you try using a logging error handler in camel, as per the following page? http://camel.apache.org/error-handler.html A likely cause is an error in the camel route that leads to the failure. However, it's also possible that the connection was dropped (check the ActiveMQ log files for signs o

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread Timothy Bish
On 01/14/2015 08:01 PM, Steve Rice wrote: Since the onMessage() function runs in a separate thread, how do I safely delete a cms::MessageListener object in the main thread using C++11? If the reply I am looking for never comes, I want to give up on listening for it and throw away this object. B

Re: how to safely delete a cms::MessageListener object

2015-01-15 Thread artnaseef
Good question. In java, we don't need to worry about the memory allocation - just the concurrency. While I don't know the answer, I'll give some input here. Have you looked through the CMS code? Some things that may work: * Closing the consumer; once the close() method returns, I would not exp

Re: ActiveMq 5.11

2015-01-15 Thread MillieretXavier
Thanks Tim, for the answer. -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMq-5-11-tp4689918p4689944.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Consumer not able to consumer messages from queue

2015-01-15 Thread xabhi
Hi Art, Can you also please take a look at http://activemq.2283324.n4.nabble.com/Consumer-not-able-to-consume-messages-from-queue-tp4689594p4689835.html Thanks, Abhi -- View this