You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nusa <se...@yahoo.co.uk> on 2006/09/26 12:16:23 UTC

Problem with failover and consumer

Hi,

I manage to integrate Tomcat_5.5.17, ActiveMQ_4.0.1 ( embeded broker ), and
Spring_1.2.8
using the following config :

1. activemq.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans>

<!--beans xmlns="http://activemq.org/config/1.0"-->

    <!-- Allows us to use system properties as variables in this
configuration file -->
    <bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>classpath:ScanningServer.properties</value>
        </property>
    </bean>

    <broker xmlns="http://activemq.org/config/1.0" useJmx="true"
brokerName="brokerDA" useShutdownHook="true" >

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
        -->
        <managementContext>
            <managementContext connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
        </managementContext>

        <!-- In ActiveMQ 4, you can setup destination policies -->
        <destinationPolicy>
            <policyMap>
                 <policyEntries>
                    <policyEntry queue="MYQUEUE.QUEUE>">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy />
                        </dispatchPolicy>
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy />
                        </subscriptionRecoveryPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

        <persistenceAdapter>
            <journaledJDBC journalLogFiles="5"
dataDirectory="../activemq-data" dataSource="#oracle-ds"/>
        </persistenceAdapter>

        <transportConnectors>
            <transportConnector name="default" uri="tcp://localhost:61616"
/>
            <transportConnector name="stomp"  
uri="stomp://localhost:61613"/>
        </transportConnectors>

        <networkConnectors>
            <networkConnector name="default" uri="failover:tcp//localhost"
failover="true"/>
        </networkConnectors>

    </broker>

    <!-- Oracle DataSource Sample Setup -->
    <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
         ...
    </bean>

</beans>


2. applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans
    PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

    <!-- This will start the broker from inside Spring.
    -->
    <bean id="brokerDA" class="org.apache.activemq.xbean.BrokerFactoryBean">
        <property name="config" value="/WEB-INF/activemq.xml"/>
        <property name="start" value="true"/>
    </bean>

    <!-- JMS ConnectionFactory to use.
         It depends on the broker to make sure that the JMS connection
created AFTER the the
         broker starts.
    -->
    <bean id="jmsFactory"
class="org.apache.activemq.ActiveMQConnectionFactory" depends-on="brokerDA">
        <property name="brokerURL">
            <value>${brokerURL}</value>
        </property>
    </bean>

    <!-- Spring JMS Template -->
    <bean id="myJmsTemplate"
class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory">
            <!-- Lets wrap in a pool to avoid creating a connection per send
-->
            <bean
class="org.springframework.jms.connection.SingleConnectionFactory">
                <property name="targetConnectionFactory" ref="jmsFactory" />
            </bean>
        </property>
    </bean>

    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
autowire="constructor">
        <constructor-arg>
            <value>org.apache.activemq.spring.Test.spring.queue</value>
        </constructor-arg>
    </bean>

    <!-- a sample POJO which uses a Spring JmsTemplate -->
    <bean id="producer" class="com.ProducerBean">
        <property name="template">
            <ref local="myJmsTemplate"/>
        </property>
        <property name="destination">
            <ref local="destination"/>
        </property>
    </bean>

    <!-- a sample POJO consumer -->
    <bean id="consumer" class="com.ConsumerBean" init-method="start">
        <property name="template">
            <ref local="myJmsTemplate"/>
        </property>
        <property name="destination">
            <ref local="destination"/>
        </property>
    </bean>

    <!-- End ActiveMQ. -->

</beans>


First problem, the failover did not work.
I got the following error log :

13:30:32,751 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in
ServletContext resource [/WEB-INF/activemq.xml]: Cannot create inner bean
'default' while setting bean property 'networkConnectors' with key [0];
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'default' defined in ServletContext resource
[/WEB-INF/activemq.xml]: Error setting property values; nested exception is
PropertyAccessExceptionsException (1 errors)
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'default' defined in ServletContext resource
[/WEB-INF/activemq.xml]: Error setting property values; nested exception is
PropertyAccessExceptionsException (1 errors)
PropertyAccessExceptionsException (1 errors)
org.springframework.beans.MethodInvocationException: Property 'uri' threw
exception; nested exception is java.io.IOException: DiscoveryAgent scheme
NOT recognized: [failover]
java.io.IOException: DiscoveryAgent scheme NOT recognized: [failover]
    at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:24)
    at
org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:49)
    at
org.apache.activemq.transport.discovery.DiscoveryAgentFactory.createDiscoveryAgent(DiscoveryAgentFactory.java:56)
    at
org.apache.activemq.network.DiscoveryNetworkConnector.setUri(DiscoveryNetworkConnector.java:57)
...
Caused by: java.io.IOException: Could not find factory class for resource:
META-INF/services/org/apache/activemq/transport/discoveryagent/failover
    at
org.apache.activeio.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:87)
    at
org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:57)
    at
org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:46)
    at
org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:45)

If I use the following network configuration :
<transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
and
<networkConnector name="default" uri="multicast://default"/>

it works well.

My second problem is that the consumer keeps receiving the messages even
after I shutdown/startup
the Tomcat, even I already specified AUTO_ACKNOWLEDGE :

...
    public void start() throws JMSException {
        try {
            ConnectionFactory factory = template.getConnectionFactory();
            connection = factory.createConnection();

            // we might be a reusable connection in spring
            // so lets only set the client ID once if its not set
            synchronized (connection) {
                if (connection.getClientID() == null) {
                    connection.setClientID(myId);
                }
            }

            connection.start();

            session = connection.createSession(true,
Session.AUTO_ACKNOWLEDGE);
            consumer = session.createConsumer(destination, selector, false);
            consumer.setMessageListener(this);
        }
        catch (JMSException ex) {
            log.error("*** Error Starting Consumer !!!", ex);
            throw ex;
        }
    }
...


So, here are my questions :
1. What is the correct syntax for failover ? And where to define it ?
2. what's wrong with my consumer ?

Thanks for any help/suggestion.

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504024
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
Am confused. You can only configure a destionation policy in the
broker. The applicationContext XML is used by your JMS client to
create Destination objects which are quite diferent things.

On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> Sorry James, confuse again.
>
> My applicationContext is like this :
> ...
>     <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
> autowire="constructor">
>         <constructor-arg>
>             <value>org.apache.activemq.spring.Test.spring.queue</value>
>         </constructor-arg>
>     </bean>
> ...
>
> and my activemq.xml is  :
> ...
>         <!-- In ActiveMQ 4, you can setup destination policies -->
>         <destinationPolicy>
>             <policyMap>
>                  <policyEntries>
>                     <policyEntry queue="MYQUEUE.QUEUE">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy />
>                         </dispatchPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> ...
>
> How to define <destinationPolicy> inside my applicationContext ? What will
> be the value of <constructor-arg> in the bean "destination"  ?
>
> Thanks.
>
>
> James.Strachan wrote:
> >
> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >>
> >> OK,  so how to define that destination policy within applicationContext ?
> >
> > There's an example on the link I just gave
> > http://incubator.apache.org/activemq/per-destination-policies.html
> >
> > you define them inside the broker element
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6506563
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
Sorry James, confuse again.

My applicationContext is like this :
...
    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
autowire="constructor">
        <constructor-arg>
            <value>org.apache.activemq.spring.Test.spring.queue</value>
        </constructor-arg>
    </bean>
...

and my activemq.xml is  :
...
        <!-- In ActiveMQ 4, you can setup destination policies -->  
        <destinationPolicy>
            <policyMap>
                 <policyEntries>        
                    <policyEntry queue="MYQUEUE.QUEUE">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy />
                        </dispatchPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
...

How to define <destinationPolicy> inside my applicationContext ? What will
be the value of <constructor-arg> in the bean "destination"  ?

Thanks.


James.Strachan wrote:
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>>
>> OK,  so how to define that destination policy within applicationContext ?
> 
> There's an example on the link I just gave
> http://incubator.apache.org/activemq/per-destination-policies.html
> 
> you define them inside the broker element
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6506563
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> OK,  so how to define that destination policy within applicationContext ?

There's an example on the link I just gave
http://incubator.apache.org/activemq/per-destination-policies.html

you define them inside the broker element

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
OK,  so how to define that destination policy within applicationContext ?


James.Strachan wrote:
> 
> <destinationPolicy> is for associating per-destination policies with
> destinations.
> 
> These pages should give you some background
> http://incubator.apache.org/activemq/how-do-i-create-new-destinations.html
> http://incubator.apache.org/activemq/per-destination-policies.html
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>>
>> OF COURSE .... oh dear oh dear oh dear ... thanks James. Just put 
>> commit(),
>> and that's it. Done.
>>
>> One last thing.
>> I define in my activemq.xml the queue destination as follows :
>>         <!-- In ActiveMQ 4, you can setup destination policies -->
>>         <destinationPolicy>
>>             <policyMap>
>>                  <policyEntries>
>>                     <policyEntry queue="MYQUEUE.QUEUE">
>>                         <dispatchPolicy>
>>                             <strictOrderDispatchPolicy />
>>                         </dispatchPolicy>
>>                     </policyEntry>
>>                 </policyEntries>
>>             </policyMap>
>>         </destinationPolicy>
>>
>> And it also defined in within applicationContext.xml :
>>
>>     <bean id="destination"
>> class="org.apache.activemq.command.ActiveMQQueue"
>> autowire="constructor">
>>         <constructor-arg>
>>             <value>org.apache.activemq.spring.Test.spring.queue</value>
>>         </constructor-arg>
>>     </bean>
>>
>>     <!-- a sample POJO consumer -->
>>     <bean id="consumer" class="ae.marcurafze.scanning.jms.ConsumerBean"
>> init-method="start" >
>>         <property name="template">
>>             <ref local="myJmsTemplate"/>
>>         </property>
>>         <property name="destination">
>>             <ref local="destination"/>
>>         </property>
>>     </bean>
>>
>> Looking at the log, it's only
>> org.apache.activemq.spring.Test.spring.queue
>> that is being used :
>> ...
>> 16:09:52,359 DEBUG [broker.region.AbstractRegion] Adding destination:
>> topic://ActiveMQ.Advisory.Connection
>> 16:09:52,375 DEBUG [broker.region.AbstractRegion] Adding destination:
>> topic://ActiveMQ.Advisory.Topic
>> 16:09:52,530 DEBUG [broker.region.AbstractRegion] Adding destination:
>> topic://ActiveMQ.Advisory.Consumer.Queue.org.apache.activemq.spring.Test.spring.queue
>> 16:09:52,645 DEBUG [factory.support.DefaultListableBeanFactory] Invoking
>> BeanPostProcessors after initialization of bean 'consumer'
>> ...
>>
>> What's the purpose of defining queue within  <destinationPolicy> ?
>> Should the  <policyEntry queue="MYQUEUE.QUEUE"> points to
>> org.apache.activemq.spring.Test.spring.queue, i.e :
>> <policyEntry queue="org.apache.activemq.spring.Test.spring.queue"> ?
>>
>> Thanks James.
>>
>>
>> James.Strachan wrote:
>> >
>> > You are creating a transactional consumer but never commit()ing the
>> > transaction - so all messages will be redelivered on startup.
>> >
>> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >>
>> >> The consumer java code :
>> >>
>> >> public class ConsumerBean implements MessageListener {
>> >>
>> >>         private Logger log = Logger.getLogger(getClass());
>> >>
>> >>     private JmsTemplate                 template;
>> >>     private Destination                 destination;
>> >>
>> >>     private Connection                  connection;
>> >>     private Session                     session;
>> >>     private MessageConsumer     consumer;
>> >>
>> >>     private String                              myId = "ABC";
>> >>
>> >>     public void start() throws JMSException {
>> >>         String selector = "next = '" + myId + "'";
>> >>
>> >>         try {
>> >>             ConnectionFactory factory =
>> template.getConnectionFactory();
>> >>             connection = factory.createConnection();
>> >>
>> >>             // we might be a reusable connection in spring
>> >>             // so lets only set the client ID once if its not set
>> >>             synchronized (connection) {
>> >>                 if (connection.getClientID() == null) {
>> >>                     connection.setClientID(myId);
>> >>                 }
>> >>             }
>> >>
>> >>             connection.start();
>> >>
>> >>             session = connection.createSession(true,
>> >> Session.AUTO_ACKNOWLEDGE);
>> >>             consumer = session.createConsumer(destination, selector,
>> >> false);
>> >>             consumer.setMessageListener(this);
>> >>         }
>> >>         catch (JMSException ex) {
>> >>             log.error("*** Error Starting Consumer !!!", ex);
>> >>             throw ex;
>> >>         }
>> >>     }
>> >>
>> >>         /* (non-Javadoc)
>> >>          * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
>> >>          */
>> >>         public void onMessage(Message msg) {
>> >>         log.info("==> Receiving a msg to generate PDF ...");
>> >>         ...
>> >>         }
>> >>
>> >>         /**
>> >>          * @return the template
>> >>          */
>> >>         public JmsTemplate getTemplate() {
>> >>                 return template;
>> >>         }
>> >>
>> >>         /**
>> >>          * @param template the template to set
>> >>          */
>> >>         public void setTemplate(JmsTemplate template) {
>> >>                 this.template = template;
>> >>         }
>> >>
>> >>         /**
>> >>          * @return the destination
>> >>          */
>> >>         public Destination getDestination() {
>> >>                 return destination;
>> >>         }
>> >>
>> >>         /**
>> >>          * @param destination the destination to set
>> >>          */
>> >>         public void setDestination(Destination destination) {
>> >>                 this.destination = destination;
>> >>         }
>> >>
>> >> }
>> >>
>> >> I think the message is consumed because the onMessage method is
>> invoked.
>> >>
>> >>
>> >> James.Strachan wrote:
>> >> >
>> >> > Could you post your consumer java code?
>> >> >
>> >> > If you browse the queues, do you see messages being consumed?
>> >> > http://incubator.apache.org/activemq/jmx.html
>> >> >
>> >> >
>> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >> >>
>> >> >> James,
>> >> >>
>> >> >> OK, I'm going to ignore this failover.
>> >> >>
>> >> >> Back to my consumer,  I'm using a queue ( I mean that what I
>> expected
>> >> ).
>> >> >> I modified my activemq.xml into :
>> >> >> ...
>> >> >>         <destinationPolicy>
>> >> >>             <policyMap>
>> >> >>                  <policyEntries>
>> >> >>                     <policyEntry queue="SCANNINGDA.QUEUE>">
>> >> >>                         <dispatchPolicy>
>> >> >>                             <strictOrderDispatchPolicy />
>> >> >>                         </dispatchPolicy>
>> >> >>                     </policyEntry>
>> >> >>                 </policyEntries>
>> >> >>             </policyMap>
>> >> >>         </destinationPolicy>
>> >> >> ...
>> >> >>
>> >> >> undeploy, then deploy the war file.
>> >> >> Yet the onMessage got invoke again WITHOUT any message sent by the
>> >> >> producer.
>> >> >> Any idea James ?
>> >> >>
>> >> >> Thanks.
>> >> >>
>> >> >>
>> >> >>
>> >> >> James.Strachan wrote:
>> >> >> >
>> >> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >> >> >> Thanks James for a quick reply.
>> >> >> >>
>> >> >> >> failover: is  only used on the client side. How and where to
>> define
>> >> it
>> >> >> ?
>> >> >> >
>> >> >> > You only use it when configuring your JMS client - ignore it for
>> >> using
>> >> >> > networkConnectors (i.e. connecting brokers to each other) as they
>> >> use
>> >> >> > a failover mechanism by default
>> >> >> >
>> >> >> >
>> >> >>
>> >>
>> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
>> >> >> >
>> >> >> >
>> >> >> >> OK, sorry for incomplete info.
>> >> >> >> Everytime I startup my Tomcat, my consumer receveive a message,
>> to
>> >> be
>> >> >> >> precised
>> >> >> >> the onMessage method is invoked, WITHOUT the producer send any
>> >> >> message.
>> >> >> >> Would that help ?
>> >> >> >
>> >> >> > I can't explain it I'm afraid. Are you using topics or queues?
>> From
>> >> >> > your configuraiton you seem to be using queues with
>> >> >> > lastImageRecoveryPolicy (which is only intended for topics). If
>> you
>> >> >> > are using last image recovery, then getting a message on startup
>> is
>> >> >> > the desired behaviour :)
>> >> >> >
>> >> >> > --
>> >> >> >
>> >> >> > James
>> >> >> > -------
>> >> >> > http://radio.weblogs.com/0112098/
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
>> >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> >
>> >> > James
>> >> > -------
>> >> > http://radio.weblogs.com/0112098/
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504962
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6505811
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6506108
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
<destinationPolicy> is for associating per-destination policies with
destinations.

These pages should give you some background
http://incubator.apache.org/activemq/how-do-i-create-new-destinations.html
http://incubator.apache.org/activemq/per-destination-policies.html

On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> OF COURSE .... oh dear oh dear oh dear ... thanks James. Just put  commit(),
> and that's it. Done.
>
> One last thing.
> I define in my activemq.xml the queue destination as follows :
>         <!-- In ActiveMQ 4, you can setup destination policies -->
>         <destinationPolicy>
>             <policyMap>
>                  <policyEntries>
>                     <policyEntry queue="MYQUEUE.QUEUE">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy />
>                         </dispatchPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
> And it also defined in within applicationContext.xml :
>
>     <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
> autowire="constructor">
>         <constructor-arg>
>             <value>org.apache.activemq.spring.Test.spring.queue</value>
>         </constructor-arg>
>     </bean>
>
>     <!-- a sample POJO consumer -->
>     <bean id="consumer" class="ae.marcurafze.scanning.jms.ConsumerBean"
> init-method="start" >
>         <property name="template">
>             <ref local="myJmsTemplate"/>
>         </property>
>         <property name="destination">
>             <ref local="destination"/>
>         </property>
>     </bean>
>
> Looking at the log, it's only org.apache.activemq.spring.Test.spring.queue
> that is being used :
> ...
> 16:09:52,359 DEBUG [broker.region.AbstractRegion] Adding destination:
> topic://ActiveMQ.Advisory.Connection
> 16:09:52,375 DEBUG [broker.region.AbstractRegion] Adding destination:
> topic://ActiveMQ.Advisory.Topic
> 16:09:52,530 DEBUG [broker.region.AbstractRegion] Adding destination:
> topic://ActiveMQ.Advisory.Consumer.Queue.org.apache.activemq.spring.Test.spring.queue
> 16:09:52,645 DEBUG [factory.support.DefaultListableBeanFactory] Invoking
> BeanPostProcessors after initialization of bean 'consumer'
> ...
>
> What's the purpose of defining queue within  <destinationPolicy> ?
> Should the  <policyEntry queue="MYQUEUE.QUEUE"> points to
> org.apache.activemq.spring.Test.spring.queue, i.e :
> <policyEntry queue="org.apache.activemq.spring.Test.spring.queue"> ?
>
> Thanks James.
>
>
> James.Strachan wrote:
> >
> > You are creating a transactional consumer but never commit()ing the
> > transaction - so all messages will be redelivered on startup.
> >
> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >>
> >> The consumer java code :
> >>
> >> public class ConsumerBean implements MessageListener {
> >>
> >>         private Logger log = Logger.getLogger(getClass());
> >>
> >>     private JmsTemplate                 template;
> >>     private Destination                 destination;
> >>
> >>     private Connection                  connection;
> >>     private Session                     session;
> >>     private MessageConsumer     consumer;
> >>
> >>     private String                              myId = "ABC";
> >>
> >>     public void start() throws JMSException {
> >>         String selector = "next = '" + myId + "'";
> >>
> >>         try {
> >>             ConnectionFactory factory = template.getConnectionFactory();
> >>             connection = factory.createConnection();
> >>
> >>             // we might be a reusable connection in spring
> >>             // so lets only set the client ID once if its not set
> >>             synchronized (connection) {
> >>                 if (connection.getClientID() == null) {
> >>                     connection.setClientID(myId);
> >>                 }
> >>             }
> >>
> >>             connection.start();
> >>
> >>             session = connection.createSession(true,
> >> Session.AUTO_ACKNOWLEDGE);
> >>             consumer = session.createConsumer(destination, selector,
> >> false);
> >>             consumer.setMessageListener(this);
> >>         }
> >>         catch (JMSException ex) {
> >>             log.error("*** Error Starting Consumer !!!", ex);
> >>             throw ex;
> >>         }
> >>     }
> >>
> >>         /* (non-Javadoc)
> >>          * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
> >>          */
> >>         public void onMessage(Message msg) {
> >>         log.info("==> Receiving a msg to generate PDF ...");
> >>         ...
> >>         }
> >>
> >>         /**
> >>          * @return the template
> >>          */
> >>         public JmsTemplate getTemplate() {
> >>                 return template;
> >>         }
> >>
> >>         /**
> >>          * @param template the template to set
> >>          */
> >>         public void setTemplate(JmsTemplate template) {
> >>                 this.template = template;
> >>         }
> >>
> >>         /**
> >>          * @return the destination
> >>          */
> >>         public Destination getDestination() {
> >>                 return destination;
> >>         }
> >>
> >>         /**
> >>          * @param destination the destination to set
> >>          */
> >>         public void setDestination(Destination destination) {
> >>                 this.destination = destination;
> >>         }
> >>
> >> }
> >>
> >> I think the message is consumed because the onMessage method is invoked.
> >>
> >>
> >> James.Strachan wrote:
> >> >
> >> > Could you post your consumer java code?
> >> >
> >> > If you browse the queues, do you see messages being consumed?
> >> > http://incubator.apache.org/activemq/jmx.html
> >> >
> >> >
> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >> >>
> >> >> James,
> >> >>
> >> >> OK, I'm going to ignore this failover.
> >> >>
> >> >> Back to my consumer,  I'm using a queue ( I mean that what I expected
> >> ).
> >> >> I modified my activemq.xml into :
> >> >> ...
> >> >>         <destinationPolicy>
> >> >>             <policyMap>
> >> >>                  <policyEntries>
> >> >>                     <policyEntry queue="SCANNINGDA.QUEUE>">
> >> >>                         <dispatchPolicy>
> >> >>                             <strictOrderDispatchPolicy />
> >> >>                         </dispatchPolicy>
> >> >>                     </policyEntry>
> >> >>                 </policyEntries>
> >> >>             </policyMap>
> >> >>         </destinationPolicy>
> >> >> ...
> >> >>
> >> >> undeploy, then deploy the war file.
> >> >> Yet the onMessage got invoke again WITHOUT any message sent by the
> >> >> producer.
> >> >> Any idea James ?
> >> >>
> >> >> Thanks.
> >> >>
> >> >>
> >> >>
> >> >> James.Strachan wrote:
> >> >> >
> >> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >> >> >> Thanks James for a quick reply.
> >> >> >>
> >> >> >> failover: is  only used on the client side. How and where to define
> >> it
> >> >> ?
> >> >> >
> >> >> > You only use it when configuring your JMS client - ignore it for
> >> using
> >> >> > networkConnectors (i.e. connecting brokers to each other) as they
> >> use
> >> >> > a failover mechanism by default
> >> >> >
> >> >> >
> >> >>
> >> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
> >> >> >
> >> >> >
> >> >> >> OK, sorry for incomplete info.
> >> >> >> Everytime I startup my Tomcat, my consumer receveive a message, to
> >> be
> >> >> >> precised
> >> >> >> the onMessage method is invoked, WITHOUT the producer send any
> >> >> message.
> >> >> >> Would that help ?
> >> >> >
> >> >> > I can't explain it I'm afraid. Are you using topics or queues? From
> >> >> > your configuraiton you seem to be using queues with
> >> >> > lastImageRecoveryPolicy (which is only intended for topics). If you
> >> >> > are using last image recovery, then getting a message on startup is
> >> >> > the desired behaviour :)
> >> >> >
> >> >> > --
> >> >> >
> >> >> > James
> >> >> > -------
> >> >> > http://radio.weblogs.com/0112098/
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
> >> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> >
> >> > James
> >> > -------
> >> > http://radio.weblogs.com/0112098/
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504962
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6505811
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
OF COURSE .... oh dear oh dear oh dear ... thanks James. Just put  commit(),
and that's it. Done.

One last thing.
I define in my activemq.xml the queue destination as follows :
        <!-- In ActiveMQ 4, you can setup destination policies -->  
        <destinationPolicy>
            <policyMap>
                 <policyEntries>        
                    <policyEntry queue="MYQUEUE.QUEUE">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy />
                        </dispatchPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

And it also defined in within applicationContext.xml :

    <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
autowire="constructor">
        <constructor-arg>
            <value>org.apache.activemq.spring.Test.spring.queue</value>
        </constructor-arg>
    </bean>
  
    <!-- a sample POJO consumer -->
    <bean id="consumer" class="ae.marcurafze.scanning.jms.ConsumerBean"
init-method="start" >
        <property name="template">
            <ref local="myJmsTemplate"/>
        </property>
        <property name="destination">
            <ref local="destination"/>
        </property>
    </bean>    

Looking at the log, it's only org.apache.activemq.spring.Test.spring.queue
that is being used :
...
16:09:52,359 DEBUG [broker.region.AbstractRegion] Adding destination:
topic://ActiveMQ.Advisory.Connection
16:09:52,375 DEBUG [broker.region.AbstractRegion] Adding destination:
topic://ActiveMQ.Advisory.Topic
16:09:52,530 DEBUG [broker.region.AbstractRegion] Adding destination:
topic://ActiveMQ.Advisory.Consumer.Queue.org.apache.activemq.spring.Test.spring.queue
16:09:52,645 DEBUG [factory.support.DefaultListableBeanFactory] Invoking
BeanPostProcessors after initialization of bean 'consumer'
...

What's the purpose of defining queue within  <destinationPolicy> ?
Should the  <policyEntry queue="MYQUEUE.QUEUE"> points to
org.apache.activemq.spring.Test.spring.queue, i.e :
<policyEntry queue="org.apache.activemq.spring.Test.spring.queue"> ?

Thanks James.


James.Strachan wrote:
> 
> You are creating a transactional consumer but never commit()ing the
> transaction - so all messages will be redelivered on startup.
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>>
>> The consumer java code :
>>
>> public class ConsumerBean implements MessageListener {
>>
>>         private Logger log = Logger.getLogger(getClass());
>>
>>     private JmsTemplate                 template;
>>     private Destination                 destination;
>>
>>     private Connection                  connection;
>>     private Session                     session;
>>     private MessageConsumer     consumer;
>>
>>     private String                              myId = "ABC";
>>
>>     public void start() throws JMSException {
>>         String selector = "next = '" + myId + "'";
>>
>>         try {
>>             ConnectionFactory factory = template.getConnectionFactory();
>>             connection = factory.createConnection();
>>
>>             // we might be a reusable connection in spring
>>             // so lets only set the client ID once if its not set
>>             synchronized (connection) {
>>                 if (connection.getClientID() == null) {
>>                     connection.setClientID(myId);
>>                 }
>>             }
>>
>>             connection.start();
>>
>>             session = connection.createSession(true,
>> Session.AUTO_ACKNOWLEDGE);
>>             consumer = session.createConsumer(destination, selector,
>> false);
>>             consumer.setMessageListener(this);
>>         }
>>         catch (JMSException ex) {
>>             log.error("*** Error Starting Consumer !!!", ex);
>>             throw ex;
>>         }
>>     }
>>
>>         /* (non-Javadoc)
>>          * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
>>          */
>>         public void onMessage(Message msg) {
>>         log.info("==> Receiving a msg to generate PDF ...");
>>         ...
>>         }
>>
>>         /**
>>          * @return the template
>>          */
>>         public JmsTemplate getTemplate() {
>>                 return template;
>>         }
>>
>>         /**
>>          * @param template the template to set
>>          */
>>         public void setTemplate(JmsTemplate template) {
>>                 this.template = template;
>>         }
>>
>>         /**
>>          * @return the destination
>>          */
>>         public Destination getDestination() {
>>                 return destination;
>>         }
>>
>>         /**
>>          * @param destination the destination to set
>>          */
>>         public void setDestination(Destination destination) {
>>                 this.destination = destination;
>>         }
>>
>> }
>>
>> I think the message is consumed because the onMessage method is invoked.
>>
>>
>> James.Strachan wrote:
>> >
>> > Could you post your consumer java code?
>> >
>> > If you browse the queues, do you see messages being consumed?
>> > http://incubator.apache.org/activemq/jmx.html
>> >
>> >
>> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >>
>> >> James,
>> >>
>> >> OK, I'm going to ignore this failover.
>> >>
>> >> Back to my consumer,  I'm using a queue ( I mean that what I expected
>> ).
>> >> I modified my activemq.xml into :
>> >> ...
>> >>         <destinationPolicy>
>> >>             <policyMap>
>> >>                  <policyEntries>
>> >>                     <policyEntry queue="SCANNINGDA.QUEUE>">
>> >>                         <dispatchPolicy>
>> >>                             <strictOrderDispatchPolicy />
>> >>                         </dispatchPolicy>
>> >>                     </policyEntry>
>> >>                 </policyEntries>
>> >>             </policyMap>
>> >>         </destinationPolicy>
>> >> ...
>> >>
>> >> undeploy, then deploy the war file.
>> >> Yet the onMessage got invoke again WITHOUT any message sent by the
>> >> producer.
>> >> Any idea James ?
>> >>
>> >> Thanks.
>> >>
>> >>
>> >>
>> >> James.Strachan wrote:
>> >> >
>> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >> >> Thanks James for a quick reply.
>> >> >>
>> >> >> failover: is  only used on the client side. How and where to define
>> it
>> >> ?
>> >> >
>> >> > You only use it when configuring your JMS client - ignore it for
>> using
>> >> > networkConnectors (i.e. connecting brokers to each other) as they
>> use
>> >> > a failover mechanism by default
>> >> >
>> >> >
>> >>
>> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
>> >> >
>> >> >
>> >> >> OK, sorry for incomplete info.
>> >> >> Everytime I startup my Tomcat, my consumer receveive a message, to
>> be
>> >> >> precised
>> >> >> the onMessage method is invoked, WITHOUT the producer send any
>> >> message.
>> >> >> Would that help ?
>> >> >
>> >> > I can't explain it I'm afraid. Are you using topics or queues? From
>> >> > your configuraiton you seem to be using queues with
>> >> > lastImageRecoveryPolicy (which is only intended for topics). If you
>> >> > are using last image recovery, then getting a message on startup is
>> >> > the desired behaviour :)
>> >> >
>> >> > --
>> >> >
>> >> > James
>> >> > -------
>> >> > http://radio.weblogs.com/0112098/
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
>> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504962
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6505811
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
You are creating a transactional consumer but never commit()ing the
transaction - so all messages will be redelivered on startup.

On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> The consumer java code :
>
> public class ConsumerBean implements MessageListener {
>
>         private Logger log = Logger.getLogger(getClass());
>
>     private JmsTemplate                 template;
>     private Destination                 destination;
>
>     private Connection                  connection;
>     private Session                     session;
>     private MessageConsumer     consumer;
>
>     private String                              myId = "ABC";
>
>     public void start() throws JMSException {
>         String selector = "next = '" + myId + "'";
>
>         try {
>             ConnectionFactory factory = template.getConnectionFactory();
>             connection = factory.createConnection();
>
>             // we might be a reusable connection in spring
>             // so lets only set the client ID once if its not set
>             synchronized (connection) {
>                 if (connection.getClientID() == null) {
>                     connection.setClientID(myId);
>                 }
>             }
>
>             connection.start();
>
>             session = connection.createSession(true,
> Session.AUTO_ACKNOWLEDGE);
>             consumer = session.createConsumer(destination, selector, false);
>             consumer.setMessageListener(this);
>         }
>         catch (JMSException ex) {
>             log.error("*** Error Starting Consumer !!!", ex);
>             throw ex;
>         }
>     }
>
>         /* (non-Javadoc)
>          * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
>          */
>         public void onMessage(Message msg) {
>         log.info("==> Receiving a msg to generate PDF ...");
>         ...
>         }
>
>         /**
>          * @return the template
>          */
>         public JmsTemplate getTemplate() {
>                 return template;
>         }
>
>         /**
>          * @param template the template to set
>          */
>         public void setTemplate(JmsTemplate template) {
>                 this.template = template;
>         }
>
>         /**
>          * @return the destination
>          */
>         public Destination getDestination() {
>                 return destination;
>         }
>
>         /**
>          * @param destination the destination to set
>          */
>         public void setDestination(Destination destination) {
>                 this.destination = destination;
>         }
>
> }
>
> I think the message is consumed because the onMessage method is invoked.
>
>
> James.Strachan wrote:
> >
> > Could you post your consumer java code?
> >
> > If you browse the queues, do you see messages being consumed?
> > http://incubator.apache.org/activemq/jmx.html
> >
> >
> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >>
> >> James,
> >>
> >> OK, I'm going to ignore this failover.
> >>
> >> Back to my consumer,  I'm using a queue ( I mean that what I expected ).
> >> I modified my activemq.xml into :
> >> ...
> >>         <destinationPolicy>
> >>             <policyMap>
> >>                  <policyEntries>
> >>                     <policyEntry queue="SCANNINGDA.QUEUE>">
> >>                         <dispatchPolicy>
> >>                             <strictOrderDispatchPolicy />
> >>                         </dispatchPolicy>
> >>                     </policyEntry>
> >>                 </policyEntries>
> >>             </policyMap>
> >>         </destinationPolicy>
> >> ...
> >>
> >> undeploy, then deploy the war file.
> >> Yet the onMessage got invoke again WITHOUT any message sent by the
> >> producer.
> >> Any idea James ?
> >>
> >> Thanks.
> >>
> >>
> >>
> >> James.Strachan wrote:
> >> >
> >> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >> >> Thanks James for a quick reply.
> >> >>
> >> >> failover: is  only used on the client side. How and where to define it
> >> ?
> >> >
> >> > You only use it when configuring your JMS client - ignore it for using
> >> > networkConnectors (i.e. connecting brokers to each other) as they use
> >> > a failover mechanism by default
> >> >
> >> >
> >> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
> >> >
> >> >
> >> >> OK, sorry for incomplete info.
> >> >> Everytime I startup my Tomcat, my consumer receveive a message, to be
> >> >> precised
> >> >> the onMessage method is invoked, WITHOUT the producer send any
> >> message.
> >> >> Would that help ?
> >> >
> >> > I can't explain it I'm afraid. Are you using topics or queues? From
> >> > your configuraiton you seem to be using queues with
> >> > lastImageRecoveryPolicy (which is only intended for topics). If you
> >> > are using last image recovery, then getting a message on startup is
> >> > the desired behaviour :)
> >> >
> >> > --
> >> >
> >> > James
> >> > -------
> >> > http://radio.weblogs.com/0112098/
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504962
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
The consumer java code :

public class ConsumerBean implements MessageListener {

	private Logger log = Logger.getLogger(getClass());

    private JmsTemplate 		template;
    private Destination 		destination;

    private Connection 			connection;
    private Session 			session;
    private MessageConsumer 	consumer;
    
    private String 				myId = "ABC";
    
    public void start() throws JMSException {
        String selector = "next = '" + myId + "'";

        try {
            ConnectionFactory factory = template.getConnectionFactory();
            connection = factory.createConnection();

            // we might be a reusable connection in spring
            // so lets only set the client ID once if its not set
            synchronized (connection) {
                if (connection.getClientID() == null) {
                    connection.setClientID(myId);
                }
            }

            connection.start();

            session = connection.createSession(true,
Session.AUTO_ACKNOWLEDGE);
            consumer = session.createConsumer(destination, selector, false);
            consumer.setMessageListener(this);
        }
        catch (JMSException ex) {
            log.error("*** Error Starting Consumer !!!", ex);
            throw ex;
        }
    }
    
	/* (non-Javadoc)
	 * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
	 */
	public void onMessage(Message msg) {
        log.info("==> Receiving a msg to generate PDF ...");
        ...
	}

	/**
	 * @return the template
	 */
	public JmsTemplate getTemplate() {
		return template;
	}

	/**
	 * @param template the template to set
	 */
	public void setTemplate(JmsTemplate template) {
		this.template = template;
	}

	/**
	 * @return the destination
	 */
	public Destination getDestination() {
		return destination;
	}

	/**
	 * @param destination the destination to set
	 */
	public void setDestination(Destination destination) {
		this.destination = destination;
	}

}

I think the message is consumed because the onMessage method is invoked.


James.Strachan wrote:
> 
> Could you post your consumer java code?
> 
> If you browse the queues, do you see messages being consumed?
> http://incubator.apache.org/activemq/jmx.html
> 
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>>
>> James,
>>
>> OK, I'm going to ignore this failover.
>>
>> Back to my consumer,  I'm using a queue ( I mean that what I expected ).
>> I modified my activemq.xml into :
>> ...
>>         <destinationPolicy>
>>             <policyMap>
>>                  <policyEntries>
>>                     <policyEntry queue="SCANNINGDA.QUEUE>">
>>                         <dispatchPolicy>
>>                             <strictOrderDispatchPolicy />
>>                         </dispatchPolicy>
>>                     </policyEntry>
>>                 </policyEntries>
>>             </policyMap>
>>         </destinationPolicy>
>> ...
>>
>> undeploy, then deploy the war file.
>> Yet the onMessage got invoke again WITHOUT any message sent by the
>> producer.
>> Any idea James ?
>>
>> Thanks.
>>
>>
>>
>> James.Strachan wrote:
>> >
>> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> >> Thanks James for a quick reply.
>> >>
>> >> failover: is  only used on the client side. How and where to define it
>> ?
>> >
>> > You only use it when configuring your JMS client - ignore it for using
>> > networkConnectors (i.e. connecting brokers to each other) as they use
>> > a failover mechanism by default
>> >
>> >
>> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
>> >
>> >
>> >> OK, sorry for incomplete info.
>> >> Everytime I startup my Tomcat, my consumer receveive a message, to be
>> >> precised
>> >> the onMessage method is invoked, WITHOUT the producer send any
>> message.
>> >> Would that help ?
>> >
>> > I can't explain it I'm afraid. Are you using topics or queues? From
>> > your configuraiton you seem to be using queues with
>> > lastImageRecoveryPolicy (which is only intended for topics). If you
>> > are using last image recovery, then getting a message on startup is
>> > the desired behaviour :)
>> >
>> > --
>> >
>> > James
>> > -------
>> > http://radio.weblogs.com/0112098/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504962
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
Could you post your consumer java code?

If you browse the queues, do you see messages being consumed?
http://incubator.apache.org/activemq/jmx.html


On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> James,
>
> OK, I'm going to ignore this failover.
>
> Back to my consumer,  I'm using a queue ( I mean that what I expected ).
> I modified my activemq.xml into :
> ...
>         <destinationPolicy>
>             <policyMap>
>                  <policyEntries>
>                     <policyEntry queue="SCANNINGDA.QUEUE>">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy />
>                         </dispatchPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> ...
>
> undeploy, then deploy the war file.
> Yet the onMessage got invoke again WITHOUT any message sent by the producer.
> Any idea James ?
>
> Thanks.
>
>
>
> James.Strachan wrote:
> >
> > On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> >> Thanks James for a quick reply.
> >>
> >> failover: is  only used on the client side. How and where to define it ?
> >
> > You only use it when configuring your JMS client - ignore it for using
> > networkConnectors (i.e. connecting brokers to each other) as they use
> > a failover mechanism by default
> >
> > http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
> >
> >
> >> OK, sorry for incomplete info.
> >> Everytime I startup my Tomcat, my consumer receveive a message, to be
> >> precised
> >> the onMessage method is invoked, WITHOUT the producer send any message.
> >> Would that help ?
> >
> > I can't explain it I'm afraid. Are you using topics or queues? From
> > your configuraiton you seem to be using queues with
> > lastImageRecoveryPolicy (which is only intended for topics). If you
> > are using last image recovery, then getting a message on startup is
> > the desired behaviour :)
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
James,

OK, I'm going to ignore this failover.

Back to my consumer,  I'm using a queue ( I mean that what I expected ).
I modified my activemq.xml into :
...
        <destinationPolicy>
            <policyMap>
                 <policyEntries>        
                    <policyEntry queue="SCANNINGDA.QUEUE>">
                        <dispatchPolicy>
                            <strictOrderDispatchPolicy />
                        </dispatchPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>
...

undeploy, then deploy the war file.
Yet the onMessage got invoke again WITHOUT any message sent by the producer.
Any idea James ?

Thanks.



James.Strachan wrote:
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>> Thanks James for a quick reply.
>>
>> failover: is  only used on the client side. How and where to define it ?
> 
> You only use it when configuring your JMS client - ignore it for using
> networkConnectors (i.e. connecting brokers to each other) as they use
> a failover mechanism by default
> 
> http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
> 
> 
>> OK, sorry for incomplete info.
>> Everytime I startup my Tomcat, my consumer receveive a message, to be
>> precised
>> the onMessage method is invoked, WITHOUT the producer send any message.
>> Would that help ?
> 
> I can't explain it I'm afraid. Are you using topics or queues? From
> your configuraiton you seem to be using queues with
> lastImageRecoveryPolicy (which is only intended for topics). If you
> are using last image recovery, then getting a message on startup is
> the desired behaviour :)
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504817
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
> Thanks James for a quick reply.
>
> failover: is  only used on the client side. How and where to define it ?

You only use it when configuring your JMS client - ignore it for using
networkConnectors (i.e. connecting brokers to each other) as they use
a failover mechanism by default

http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html


> OK, sorry for incomplete info.
> Everytime I startup my Tomcat, my consumer receveive a message, to be
> precised
> the onMessage method is invoked, WITHOUT the producer send any message.
> Would that help ?

I can't explain it I'm afraid. Are you using topics or queues? From
your configuraiton you seem to be using queues with
lastImageRecoveryPolicy (which is only intended for topics). If you
are using last image recovery, then getting a message on startup is
the desired behaviour :)

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Problem with failover and consumer

Posted by nusa <se...@yahoo.co.uk>.
Thanks James for a quick reply.

failover: is  only used on the client side. How and where to define it ?

OK, sorry for incomplete info. 
Everytime I startup my Tomcat, my consumer receveive a message, to be
precised
the onMessage method is invoked, WITHOUT the producer send any message.
Would that help ?



James.Strachan wrote:
> 
> 1. You kinda answered your first question - failover: is only used on
> the client side - you don't need it on a networkConnector.
> 
> 2. I don't quite follow this question - when you shut down tomcat and
> the JVM your consumer still gets messages? But how when its in the
> same JVM? Maybe its just the prefetch buffer you're seeing which is
> confusing you?
> 
> http://incubator.apache.org/activemq/what-is-the-prefetch-limit-for.html
> 
> On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>>
>> Hi,
>>
>> I manage to integrate Tomcat_5.5.17, ActiveMQ_4.0.1 ( embeded broker ),
>> and
>> Spring_1.2.8
>> using the following config :
>>
>> 1. activemq.xml
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans>
>>
>> <!--beans xmlns="http://activemq.org/config/1.0"-->
>>
>>     <!-- Allows us to use system properties as variables in this
>> configuration file -->
>>     <bean id="propertyConfigurer"
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>>         <property name="locations">
>>             <value>classpath:ScanningServer.properties</value>
>>         </property>
>>     </bean>
>>
>>     <broker xmlns="http://activemq.org/config/1.0" useJmx="true"
>> brokerName="brokerDA" useShutdownHook="true" >
>>
>>         <!-- Use the following to configure how ActiveMQ is exposed in
>> JMX
>>         -->
>>         <managementContext>
>>             <managementContext connectorPort="1099"
>> jmxDomainName="org.apache.activemq"/>
>>         </managementContext>
>>
>>         <!-- In ActiveMQ 4, you can setup destination policies -->
>>         <destinationPolicy>
>>             <policyMap>
>>                  <policyEntries>
>>                     <policyEntry queue="MYQUEUE.QUEUE>">
>>                         <dispatchPolicy>
>>                             <strictOrderDispatchPolicy />
>>                         </dispatchPolicy>
>>                         <subscriptionRecoveryPolicy>
>>                             <lastImageSubscriptionRecoveryPolicy />
>>                         </subscriptionRecoveryPolicy>
>>                     </policyEntry>
>>                 </policyEntries>
>>             </policyMap>
>>         </destinationPolicy>
>>
>>         <persistenceAdapter>
>>             <journaledJDBC journalLogFiles="5"
>> dataDirectory="../activemq-data" dataSource="#oracle-ds"/>
>>         </persistenceAdapter>
>>
>>         <transportConnectors>
>>             <transportConnector name="default"
>> uri="tcp://localhost:61616"
>> />
>>             <transportConnector name="stomp"
>> uri="stomp://localhost:61613"/>
>>         </transportConnectors>
>>
>>         <networkConnectors>
>>             <networkConnector name="default"
>> uri="failover:tcp//localhost"
>> failover="true"/>
>>         </networkConnectors>
>>
>>     </broker>
>>
>>     <!-- Oracle DataSource Sample Setup -->
>>     <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
>> destroy-method="close">
>>          ...
>>     </bean>
>>
>> </beans>
>>
>>
>> 2. applicationContext.xml
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!DOCTYPE beans
>>     PUBLIC "-//SPRING//DTD BEAN//EN"
>> "http://www.springframework.org/dtd/spring-beans.dtd">
>>
>> <beans>
>>
>>     <!-- This will start the broker from inside Spring.
>>     -->
>>     <bean id="brokerDA"
>> class="org.apache.activemq.xbean.BrokerFactoryBean">
>>         <property name="config" value="/WEB-INF/activemq.xml"/>
>>         <property name="start" value="true"/>
>>     </bean>
>>
>>     <!-- JMS ConnectionFactory to use.
>>          It depends on the broker to make sure that the JMS connection
>> created AFTER the the
>>          broker starts.
>>     -->
>>     <bean id="jmsFactory"
>> class="org.apache.activemq.ActiveMQConnectionFactory"
>> depends-on="brokerDA">
>>         <property name="brokerURL">
>>             <value>${brokerURL}</value>
>>         </property>
>>     </bean>
>>
>>     <!-- Spring JMS Template -->
>>     <bean id="myJmsTemplate"
>> class="org.springframework.jms.core.JmsTemplate">
>>         <property name="connectionFactory">
>>             <!-- Lets wrap in a pool to avoid creating a connection per
>> send
>> -->
>>             <bean
>> class="org.springframework.jms.connection.SingleConnectionFactory">
>>                 <property name="targetConnectionFactory" ref="jmsFactory"
>> />
>>             </bean>
>>         </property>
>>     </bean>
>>
>>     <bean id="destination"
>> class="org.apache.activemq.command.ActiveMQQueue"
>> autowire="constructor">
>>         <constructor-arg>
>>             <value>org.apache.activemq.spring.Test.spring.queue</value>
>>         </constructor-arg>
>>     </bean>
>>
>>     <!-- a sample POJO which uses a Spring JmsTemplate -->
>>     <bean id="producer" class="com.ProducerBean">
>>         <property name="template">
>>             <ref local="myJmsTemplate"/>
>>         </property>
>>         <property name="destination">
>>             <ref local="destination"/>
>>         </property>
>>     </bean>
>>
>>     <!-- a sample POJO consumer -->
>>     <bean id="consumer" class="com.ConsumerBean" init-method="start">
>>         <property name="template">
>>             <ref local="myJmsTemplate"/>
>>         </property>
>>         <property name="destination">
>>             <ref local="destination"/>
>>         </property>
>>     </bean>
>>
>>     <!-- End ActiveMQ. -->
>>
>> </beans>
>>
>>
>> First problem, the failover did not work.
>> I got the following error log :
>>
>> 13:30:32,751 ERROR [web.context.ContextLoader] Context initialization
>> failed
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in
>> ServletContext resource [/WEB-INF/activemq.xml]: Cannot create inner bean
>> 'default' while setting bean property 'networkConnectors' with key [0];
>> nested exception is
>> org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'default' defined in ServletContext
>> resource
>> [/WEB-INF/activemq.xml]: Error setting property values; nested exception
>> is
>> PropertyAccessExceptionsException (1 errors)
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'default' defined in ServletContext resource
>> [/WEB-INF/activemq.xml]: Error setting property values; nested exception
>> is
>> PropertyAccessExceptionsException (1 errors)
>> PropertyAccessExceptionsException (1 errors)
>> org.springframework.beans.MethodInvocationException: Property 'uri' threw
>> exception; nested exception is java.io.IOException: DiscoveryAgent scheme
>> NOT recognized: [failover]
>> java.io.IOException: DiscoveryAgent scheme NOT recognized: [failover]
>>     at
>> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:24)
>>     at
>> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:49)
>>     at
>> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.createDiscoveryAgent(DiscoveryAgentFactory.java:56)
>>     at
>> org.apache.activemq.network.DiscoveryNetworkConnector.setUri(DiscoveryNetworkConnector.java:57)
>> ...
>> Caused by: java.io.IOException: Could not find factory class for
>> resource:
>> META-INF/services/org/apache/activemq/transport/discoveryagent/failover
>>     at
>> org.apache.activeio.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:87)
>>     at
>> org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:57)
>>     at
>> org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:46)
>>     at
>> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:45)
>>
>> If I use the following network configuration :
>> <transportConnector name="default" uri="tcp://localhost:61616"
>> discoveryUri="multicast://default"/>
>> and
>> <networkConnector name="default" uri="multicast://default"/>
>>
>> it works well.
>>
>> My second problem is that the consumer keeps receiving the messages even
>> after I shutdown/startup
>> the Tomcat, even I already specified AUTO_ACKNOWLEDGE :
>>
>> ...
>>     public void start() throws JMSException {
>>         try {
>>             ConnectionFactory factory = template.getConnectionFactory();
>>             connection = factory.createConnection();
>>
>>             // we might be a reusable connection in spring
>>             // so lets only set the client ID once if its not set
>>             synchronized (connection) {
>>                 if (connection.getClientID() == null) {
>>                     connection.setClientID(myId);
>>                 }
>>             }
>>
>>             connection.start();
>>
>>             session = connection.createSession(true,
>> Session.AUTO_ACKNOWLEDGE);
>>             consumer = session.createConsumer(destination, selector,
>> false);
>>             consumer.setMessageListener(this);
>>         }
>>         catch (JMSException ex) {
>>             log.error("*** Error Starting Consumer !!!", ex);
>>             throw ex;
>>         }
>>     }
>> ...
>>
>>
>> So, here are my questions :
>> 1. What is the correct syntax for failover ? And where to define it ?
>> 2. what's wrong with my consumer ?
>>
>> Thanks for any help/suggestion.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504024
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504492
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Problem with failover and consumer

Posted by James Strachan <ja...@gmail.com>.
1. You kinda answered your first question - failover: is only used on
the client side - you don't need it on a networkConnector.

2. I don't quite follow this question - when you shut down tomcat and
the JVM your consumer still gets messages? But how when its in the
same JVM? Maybe its just the prefetch buffer you're seeing which is
confusing you?

http://incubator.apache.org/activemq/what-is-the-prefetch-limit-for.html

On 9/26/06, nusa <se...@yahoo.co.uk> wrote:
>
> Hi,
>
> I manage to integrate Tomcat_5.5.17, ActiveMQ_4.0.1 ( embeded broker ), and
> Spring_1.2.8
> using the following config :
>
> 1. activemq.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans>
>
> <!--beans xmlns="http://activemq.org/config/1.0"-->
>
>     <!-- Allows us to use system properties as variables in this
> configuration file -->
>     <bean id="propertyConfigurer"
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>         <property name="locations">
>             <value>classpath:ScanningServer.properties</value>
>         </property>
>     </bean>
>
>     <broker xmlns="http://activemq.org/config/1.0" useJmx="true"
> brokerName="brokerDA" useShutdownHook="true" >
>
>         <!-- Use the following to configure how ActiveMQ is exposed in JMX
>         -->
>         <managementContext>
>             <managementContext connectorPort="1099"
> jmxDomainName="org.apache.activemq"/>
>         </managementContext>
>
>         <!-- In ActiveMQ 4, you can setup destination policies -->
>         <destinationPolicy>
>             <policyMap>
>                  <policyEntries>
>                     <policyEntry queue="MYQUEUE.QUEUE>">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy />
>                         </dispatchPolicy>
>                         <subscriptionRecoveryPolicy>
>                             <lastImageSubscriptionRecoveryPolicy />
>                         </subscriptionRecoveryPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>         <persistenceAdapter>
>             <journaledJDBC journalLogFiles="5"
> dataDirectory="../activemq-data" dataSource="#oracle-ds"/>
>         </persistenceAdapter>
>
>         <transportConnectors>
>             <transportConnector name="default" uri="tcp://localhost:61616"
> />
>             <transportConnector name="stomp"
> uri="stomp://localhost:61613"/>
>         </transportConnectors>
>
>         <networkConnectors>
>             <networkConnector name="default" uri="failover:tcp//localhost"
> failover="true"/>
>         </networkConnectors>
>
>     </broker>
>
>     <!-- Oracle DataSource Sample Setup -->
>     <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>          ...
>     </bean>
>
> </beans>
>
>
> 2. applicationContext.xml
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE beans
>     PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd">
>
> <beans>
>
>     <!-- This will start the broker from inside Spring.
>     -->
>     <bean id="brokerDA" class="org.apache.activemq.xbean.BrokerFactoryBean">
>         <property name="config" value="/WEB-INF/activemq.xml"/>
>         <property name="start" value="true"/>
>     </bean>
>
>     <!-- JMS ConnectionFactory to use.
>          It depends on the broker to make sure that the JMS connection
> created AFTER the the
>          broker starts.
>     -->
>     <bean id="jmsFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory" depends-on="brokerDA">
>         <property name="brokerURL">
>             <value>${brokerURL}</value>
>         </property>
>     </bean>
>
>     <!-- Spring JMS Template -->
>     <bean id="myJmsTemplate"
> class="org.springframework.jms.core.JmsTemplate">
>         <property name="connectionFactory">
>             <!-- Lets wrap in a pool to avoid creating a connection per send
> -->
>             <bean
> class="org.springframework.jms.connection.SingleConnectionFactory">
>                 <property name="targetConnectionFactory" ref="jmsFactory" />
>             </bean>
>         </property>
>     </bean>
>
>     <bean id="destination" class="org.apache.activemq.command.ActiveMQQueue"
> autowire="constructor">
>         <constructor-arg>
>             <value>org.apache.activemq.spring.Test.spring.queue</value>
>         </constructor-arg>
>     </bean>
>
>     <!-- a sample POJO which uses a Spring JmsTemplate -->
>     <bean id="producer" class="com.ProducerBean">
>         <property name="template">
>             <ref local="myJmsTemplate"/>
>         </property>
>         <property name="destination">
>             <ref local="destination"/>
>         </property>
>     </bean>
>
>     <!-- a sample POJO consumer -->
>     <bean id="consumer" class="com.ConsumerBean" init-method="start">
>         <property name="template">
>             <ref local="myJmsTemplate"/>
>         </property>
>         <property name="destination">
>             <ref local="destination"/>
>         </property>
>     </bean>
>
>     <!-- End ActiveMQ. -->
>
> </beans>
>
>
> First problem, the failover did not work.
> I got the following error log :
>
> 13:30:32,751 ERROR [web.context.ContextLoader] Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in
> ServletContext resource [/WEB-INF/activemq.xml]: Cannot create inner bean
> 'default' while setting bean property 'networkConnectors' with key [0];
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'default' defined in ServletContext resource
> [/WEB-INF/activemq.xml]: Error setting property values; nested exception is
> PropertyAccessExceptionsException (1 errors)
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'default' defined in ServletContext resource
> [/WEB-INF/activemq.xml]: Error setting property values; nested exception is
> PropertyAccessExceptionsException (1 errors)
> PropertyAccessExceptionsException (1 errors)
> org.springframework.beans.MethodInvocationException: Property 'uri' threw
> exception; nested exception is java.io.IOException: DiscoveryAgent scheme
> NOT recognized: [failover]
> java.io.IOException: DiscoveryAgent scheme NOT recognized: [failover]
>     at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:24)
>     at
> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:49)
>     at
> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.createDiscoveryAgent(DiscoveryAgentFactory.java:56)
>     at
> org.apache.activemq.network.DiscoveryNetworkConnector.setUri(DiscoveryNetworkConnector.java:57)
> ...
> Caused by: java.io.IOException: Could not find factory class for resource:
> META-INF/services/org/apache/activemq/transport/discoveryagent/failover
>     at
> org.apache.activeio.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:87)
>     at
> org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:57)
>     at
> org.apache.activeio.util.FactoryFinder.newInstance(FactoryFinder.java:46)
>     at
> org.apache.activemq.transport.discovery.DiscoveryAgentFactory.findDiscoveryAgentFactory(DiscoveryAgentFactory.java:45)
>
> If I use the following network configuration :
> <transportConnector name="default" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
> and
> <networkConnector name="default" uri="multicast://default"/>
>
> it works well.
>
> My second problem is that the consumer keeps receiving the messages even
> after I shutdown/startup
> the Tomcat, even I already specified AUTO_ACKNOWLEDGE :
>
> ...
>     public void start() throws JMSException {
>         try {
>             ConnectionFactory factory = template.getConnectionFactory();
>             connection = factory.createConnection();
>
>             // we might be a reusable connection in spring
>             // so lets only set the client ID once if its not set
>             synchronized (connection) {
>                 if (connection.getClientID() == null) {
>                     connection.setClientID(myId);
>                 }
>             }
>
>             connection.start();
>
>             session = connection.createSession(true,
> Session.AUTO_ACKNOWLEDGE);
>             consumer = session.createConsumer(destination, selector, false);
>             consumer.setMessageListener(this);
>         }
>         catch (JMSException ex) {
>             log.error("*** Error Starting Consumer !!!", ex);
>             throw ex;
>         }
>     }
> ...
>
>
> So, here are my questions :
> 1. What is the correct syntax for failover ? And where to define it ?
> 2. what's wrong with my consumer ?
>
> Thanks for any help/suggestion.
>
> --
> View this message in context: http://www.nabble.com/Problem-with-failover-and-consumer-tf2337476.html#a6504024
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/