Thank you for your answers. OK. My program will know how many consumers are active when I want to send the first message, and my program will be aware that some consumers are not accessible, even in a global network of brokers topology.
I'm going to try this and simulate broken networks... Eric-AWL. rajdavies wrote: > > Hi Eric-AWL > On 20 Apr 2009, at 10:01, Eric-AWL wrote: > >> >> Hi everybody >> >> I continue previous thread which describes how to use Advisory >> package and >> ConsumerEventSource.setConsumerListener. >> >> >> I will be in a network of brokers configuration where consumers are >> not >> directly created on the current embedded broker used by my current >> connection. >> >> I have some questions about this way to know how many consumers are >> attached >> to a queue or a topic. >> >> Will I receive such kind of event when my embedded broker connects >> to a new >> distant broker where a consumer exists for this queue/topic ? > Yes - you'll receive events for any existing consumers that have > registered before you added your listener for those events >> >> >> Will I receive such kind of event when a distant broker which has a >> consumer >> for this queue/topic, disappears (network fault between the two >> brokers) ? > Yes - that's how it should work (haven't tested this lately) >> >> >> What is the best way to know how many consumers exist for a producer >> just >> created ? Is there a way to know this information without trying to >> send a >> message on the queue/topic associated with the producer ? > By registering a listener for consumers/producers - you'll get > notification of all existing consumers/producers - doesn't that work ? >> >> >> Thank you very much for your answers >> Eric-AWL >> >> -- >> View this message in context: >> http://www.nabble.com/Listeners-consumerEventSource-small-precisions-...-tp23132900p23132900.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> > > > -- View this message in context: http://www.nabble.com/Listeners-consumerEventSource-small-precisions-...-tp23132900p23133364.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.