2008/5/8 beaker <[EMAIL PROTECTED]>: > > Hello, > > is it possible for a producer to detect, if there are any consumers on the > topic/queue he is sending?
Yes - you can use advisories... http://activemq.apache.org/advisory-message.html e.g. try using the ConsumerEventSource helper class... http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/advisory/ConsumerEventSource.html > I want the producer to only send out messages, if there is someone listening > for them. We could maybe enhance the JMS client so that it can avoid sending messages to topics which have no consumers (i.e. to reduce the cost of marshalling the message on the wire and sending it to the broker and the broker consuming it). -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com