You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ryan Moquin <fr...@gmail.com> on 2008/08/20 04:52:12 UTC

Does useAsyncSend work in ActiveMQ 4.1.1?

I was trying this configuration in Servicemix, and even though I set
useAsyncSend to true, my producer still blocks when there is no consumer
listening on the topic it is sending to.

<bean id="connectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616" />
        <property name="useCompression" value="true" />
        <property name="useAsyncSend" value="true" />
      </bean>
    </property>
    <!--Configure maximum sessions per connection -->
    <property name="maximumActive" value="1" />
  </bean>

Re: Does useAsyncSend work in ActiveMQ 4.1.1?

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, Aug 20, 2008 at 2:51 PM, Ryan Moquin <fr...@gmail.com> wrote:
> So it will still block if the jms flow is restricting the producer then?

The JMS Flow is part of ServiceMix, not part of ActiveMQ so async
sends are not involved when setting useAsyncSend to true.

> I
> was under the impression that setting would cause the producer to basically
> toss the message out the window and then speed off down the road without
> looking back.  This isn't what happens when I attempt to use it, but that's
> what I expected that it would do.

The affect of setting useAsyncSend to true is that the
ActiveMQConnection will send the message in an asynchronous manner.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Re: Does useAsyncSend work in ActiveMQ 4.1.1?

Posted by Ryan Moquin <fr...@gmail.com>.
So it will still block if the jms flow is restricting the producer then?  I
was under the impression that setting would cause the producer to basically
toss the message out the window and then speed off down the road without
looking back.  This isn't what happens when I attempt to use it, but that's
what I expected that it would do.

On Wed, Aug 20, 2008 at 4:06 PM, Bruce Snyder <br...@gmail.com>wrote:

> On Tue, Aug 19, 2008 at 8:52 PM, Ryan Moquin <fr...@gmail.com>
> wrote:
> > I was trying this configuration in Servicemix, and even though I set
> > useAsyncSend to true, my producer still blocks when there is no consumer
> > listening on the topic it is sending to.
> >
> > <bean id="connectionFactory"
> > class="org.apache.activemq.pool.PooledConnectionFactory">
> >    <property name="connectionFactory">
> >      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> >        <property name="brokerURL" value="tcp://localhost:61616" />
> >        <property name="useCompression" value="true" />
> >        <property name="useAsyncSend" value="true" />
> >      </bean>
> >    </property>
> >    <!--Configure maximum sessions per connection -->
> >    <property name="maximumActive" value="1" />
> >  </bean>
>
> Async sends just tells a producer not to block waiting for an ack for
> each message sent. For more info, see the following:
>
> http://activemq.apache.org/async-sends.html
>
> Bruce
> --
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
>
> Blog: http://bruceblog.org/
>

Re: Does useAsyncSend work in ActiveMQ 4.1.1?

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, Aug 19, 2008 at 8:52 PM, Ryan Moquin <fr...@gmail.com> wrote:
> I was trying this configuration in Servicemix, and even though I set
> useAsyncSend to true, my producer still blocks when there is no consumer
> listening on the topic it is sending to.
>
> <bean id="connectionFactory"
> class="org.apache.activemq.pool.PooledConnectionFactory">
>    <property name="connectionFactory">
>      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
>        <property name="brokerURL" value="tcp://localhost:61616" />
>        <property name="useCompression" value="true" />
>        <property name="useAsyncSend" value="true" />
>      </bean>
>    </property>
>    <!--Configure maximum sessions per connection -->
>    <property name="maximumActive" value="1" />
>  </bean>

Async sends just tells a producer not to block waiting for an ack for
each message sent. For more info, see the following:

http://activemq.apache.org/async-sends.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/