You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Paul French <pa...@frenchiesystems.com> on 2006/07/27 15:40:01 UTC
jencks or spring 2.0
Now that Spring 2.0 supports MDB which do you use, Jencks or Spring 2.0?
--
View this message in context: http://www.nabble.com/jencks-or-spring-2.0-tf2009623.html#a5521169
Sent from the ActiveMQ - User forum at Nabble.com.
Re: jencks or spring 2.0
Posted by James Strachan <ja...@gmail.com>.
On 7/27/06, Hiram Chirino <hi...@hiramchirino.com> wrote:
> On 7/27/06, James Strachan <ja...@gmail.com> wrote:
> >
> > On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
> > >
> > > Thanks James, Judging from the mailing lists you are a very busy man!!
> > >
> > > I think you misunderstood my question?
> > >
> > > Does Jencks pool sessions OR connections when using JMS?
> >
> > It pools both
> >
> >
> > > Using Spring SingleConnectionFactory we reuse the same connection.
> > However
> > > Spring will create a new session and consumer/producer on the fly when
> > using
> > > the JmsTemplate. Hence my question:
> > >
> > >
> > > Is a new session object fairly lightweight? (from the point of view of
> > > creating it)
> >
> > Not in term of latency as it requires a blocking request-response with
> > a broker. Ditto when creating/closing producers/consumers.
>
>
> Actually, creating/closing a session and producer uses async one way
> messages. So, latencey should not be an issue unless you are bandwith
> constrained.
> But creating/closing consumers does use a blocking RPC.
Thanks for the correction - you're right - DOH. I always thought there
were all sync - didn't realise how clever ActiveMQ was :)
I kinda thought creating a producer might have to check security on
the broker too? (I guess we can always do that check on the send()
call).
--
James
-------
http://radio.weblogs.com/0112098/
Re: jencks or spring 2.0
Posted by Hiram Chirino <hi...@hiramchirino.com>.
On 7/27/06, James Strachan <ja...@gmail.com> wrote:
>
> On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
> >
> > Thanks James, Judging from the mailing lists you are a very busy man!!
> >
> > I think you misunderstood my question?
> >
> > Does Jencks pool sessions OR connections when using JMS?
>
> It pools both
>
>
> > Using Spring SingleConnectionFactory we reuse the same connection.
> However
> > Spring will create a new session and consumer/producer on the fly when
> using
> > the JmsTemplate. Hence my question:
> >
> >
> > Is a new session object fairly lightweight? (from the point of view of
> > creating it)
>
> Not in term of latency as it requires a blocking request-response with
> a broker. Ditto when creating/closing producers/consumers.
Actually, creating/closing a session and producer uses async one way
messages. So, latencey should not be an issue unless you are bandwith
constrained.
But creating/closing consumers does use a blocking RPC.
So even using SingleConnectionFactory with JmsTemplate to send 1
> message will require 4 request responses purely for the session &
> producer - then another one to send the message (if you are not using
> async sends). Async sending can't really help avoid the 4 blocking
> request-responses that JmsTemplate introduces.
>
>
> > Hence using Jencks would you not still have to create a
> producer/consumer on
> > the fly for each of your working threads?
>
> Jencks pools them.
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
--
Regards,
Hiram
Blog: http://hiramchirino.com
Re: jencks or spring 2.0
Posted by James Strachan <ja...@gmail.com>.
On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> Thanks James, Judging from the mailing lists you are a very busy man!!
>
> I think you misunderstood my question?
>
> Does Jencks pool sessions OR connections when using JMS?
It pools both
> Using Spring SingleConnectionFactory we reuse the same connection. However
> Spring will create a new session and consumer/producer on the fly when using
> the JmsTemplate. Hence my question:
>
>
> Is a new session object fairly lightweight? (from the point of view of
> creating it)
Not in term of latency as it requires a blocking request-response with
a broker. Ditto when creating/closing producers/consumers.
So even using SingleConnectionFactory with JmsTemplate to send 1
message will require 4 request responses purely for the session &
producer - then another one to send the message (if you are not using
async sends). Async sending can't really help avoid the 4 blocking
request-responses that JmsTemplate introduces.
> Hence using Jencks would you not still have to create a producer/consumer on
> the fly for each of your working threads?
Jencks pools them.
--
James
-------
http://radio.weblogs.com/0112098/
Re: jencks or spring 2.0
Posted by Paul French <pa...@frenchiesystems.com>.
Thanks James, Judging from the mailing lists you are a very busy man!!
I think you misunderstood my question?
Does Jencks pool sessions OR connections when using JMS?
Using Spring SingleConnectionFactory we reuse the same connection. However
Spring will create a new session and consumer/producer on the fly when using
the JmsTemplate. Hence my question:
Is a new session object fairly lightweight? (from the point of view of
creating it)
Jencks pools sessions or connections (??) and AFAIK a
session,producer/consumer are not thread safe.
Hence using Jencks would you not still have to create a producer/consumer on
the fly for each of your working threads?
--
View this message in context: http://www.nabble.com/jencks-or-spring-2.0-tf2009623.html#a5523002
Sent from the ActiveMQ - User forum at Nabble.com.
Re: jencks or spring 2.0
Posted by James Strachan <ja...@gmail.com>.
On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> Does Jencks pool sessions or connections when using JMS?
Yes
> Assuming we re-use the same connection I believe the Spring JmsTemplate will
> always create a new session when sending a new message?
Yes - and connection and producer/consumer
> If this is the case is this okay? i.e. Is a new session object fairly
> lightweight?
No - see these links
http://incubator.apache.org/activemq/how-do-i-use-jms-efficiently.html
http://incubator.apache.org/activemq/jmstemplate-gotchas.html
--
James
-------
http://radio.weblogs.com/0112098/
Re: jencks or spring 2.0
Posted by Paul French <pa...@frenchiesystems.com>.
Does Jencks pool sessions or connections when using JMS?
Assuming we re-use the same connection I believe the Spring JmsTemplate will
always create a new session when sending a new message?
If this is the case is this okay? i.e. Is a new session object fairly
lightweight?
--
View this message in context: http://www.nabble.com/jencks-or-spring-2.0-tf2009623.html#a5521957
Sent from the ActiveMQ - User forum at Nabble.com.
Re: jencks or spring 2.0
Posted by James Strachan <ja...@gmail.com>.
On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> Thanks.
>
> For outbound messaging withtout using Jencks using async messaging how
> performant is ActiveMQ?
Crazy fast :)
> I'm trying to understand what ActiveMQ does under
> the hood for async messaging. I beleive ActiveMQ sticks the aync messages in
> memory somewhere for ActiveMQ to send them in the background.
Yes. So the send() cost is typically the cost of a thread safe
collection object (think SEDA queue)
> This will answer my question whether I need to use Jencks for outbound
> messaging or not?
Using Jencks for outbound is typically a transaction issue (e.g.
wishing to associate the connections/sessions with the transaction
that is in progress from incoming EJB/MDBs etc).
If you are not using transactions and are using async sending, there's
no real need to pool the sessions used for sending.
--
James
-------
http://radio.weblogs.com/0112098/
Re: jencks or spring 2.0
Posted by Paul French <pa...@frenchiesystems.com>.
Thanks.
For outbound messaging withtout using Jencks using async messaging how
performant is ActiveMQ? I'm trying to understand what ActiveMQ does under
the hood for async messaging. I beleive ActiveMQ sticks the aync messages in
memory somewhere for ActiveMQ to send them in the background.
This will answer my question whether I need to use Jencks for outbound
messaging or not?
--
View this message in context: http://www.nabble.com/jencks-or-spring-2.0-tf2009623.html#a5521522
Sent from the ActiveMQ - User forum at Nabble.com.
Re: jencks or spring 2.0
Posted by James Strachan <ja...@gmail.com>.
On 7/27/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> Now that Spring 2.0 supports MDB which do you use, Jencks or Spring 2.0?
There's a comparison here...
http://jencks.org/How+does+Jencks+compare+to+Springs+MDPs
--
James
-------
http://radio.weblogs.com/0112098/