activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Wire Format Negotiation Timeout -- Say what??
Date Tue, 14 May 2013 00:26:01 GMT
No, it's probably the same cost. But the cost is in establishing the
underlying connection, not in creating the session. It just happens that if
you haven't started the connection by the time you try to create the
session, creating the session will set up the underlying connection data
structures before creating a session. Which would explain what you were
seeing.

I would also be curious to understand why starting the connection before
creating the session would get messages delivered. What version are you
using?


On Mon, May 13, 2013 at 4:57 PM, fenbers <Mark.Fenbers@noaa.gov> wrote:

>
>
>
>
>
>
>     Well, what happens when you "create a connection" but
>       don't start it, it
>
>       will open the transport and start wire format negotiation... when
>       you do
>
>       connection.start().. or when you try to open a session, it will
>       ensure that
>
>       the connection is properly constructed, which is the expensive
>       part. So
>
>       sessions by themselves are cheap enough as long as the
> &nbsp;connection
>       is up.
>
>
>
>     I typically:
>
>       create connection
>       create session
>       create producer/consumer
>       set producer/consumer options
>       start connection, which is the last thing before returning
>         from the run() method
>
>     I find that if I start the connection right after Step 1, then I
>       occasionally see errors complaining that a message was received
>       before a consumer was created.&nbsp; Starting my connection last
> seems
>       to resolve that problem.&nbsp; Are you saying that it is more
> expensive
>       to do this in my order (above) than it would be if I started my
>       connection right after Step 1??
>
>       Mark
>
>
>
>
>
>
> mark_fenbers.vcf (360 bytes) <
> http://activemq.2283324.n4.nabble.com/attachment/4666998/0/mark_fenbers.vcf
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Wire-Format-Negotiation-Timeout-Say-what-tp4666972p4666998.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message