Hi, I have a problem; I've been banging my head against this for quite some time now so any advice would be much appreciated. I've searched the archives and the docs but didn't find a solution.
I'm using ActiveMQ in a Spring-based application, but w/o Spring's specific JMS features (e.g., I'm not using JmsTemplate, etc). Using an embedded broker, the in-VM transport and (only) pub/sub, synchronous message consuming works fine but asynchronous consumption (using a message listener which is set to the consumer) does not work – the MessageListener just never gets called. By the way, what I really need is for each thread to consume its messages synchronously, but from a single channel, to which all messages in all topics that particular thread is subscribed to will arrive. Since I didn't see a simpler way for JMS to allow this (and quite possibly I've missed something...), I implemented this by each thread having a blocking concurrent queue to which its message listener (same thread-safe instance for all consumers of a given thread) enqueues the messages' payload. My application is moderately parallelized; there will be ~20 modules, each running in its own thread. Currently they are running in the same VM, but the future will demand involving several hosts. The plan is for all of the threads to communicate transparently via JMS, not knowing if the recipients share the VM with them or not. Another, related question: The topics are created dynamically. Is there any problem with 2 (or more) threads calling 'createTopic' on the same topic (same topic name) ? (One publisher and one subscriber, at the least). Or should I share the same Topic object between the threads, when they're in the same VM? Thanks, Chasta -- View this message in context: http://www.nabble.com/Dynamic-topics%2C-in-VM%3A-MessageListener-not-being-invoked-tf2573606.html#a7174437 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
