activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: Understanding basic config
Date Wed, 28 Sep 2011 22:33:29 GMT
On Wed, 2011-09-28 at 14:05 -0700, Mohit Anchlia wrote:
> I have this config. Trying to understand few things:
> 
> 1. what's the different between uri="tcp://localhost:0" and
> brokerURL="vm://localhost" ?
> 2. In point 1 why are both not tcp?
> 3. what is :0? That doesn't look like a port to me. Is this specifial
> for embedded broker?
> 
> 
> 
>  <amq:broker useJmx="false" persistent="false">
>     <amq:transportConnectors>
>       <amq:transportConnector uri="tcp://localhost:0" />
>     </amq:transportConnectors>
>   </amq:broker>
> 
>    <!--  ActiveMQ destinations to use  -->
>   <amq:queue id="destination"
> physicalName="org.apache.activemq.spring.Test.spring.embedded"/>
> 
>   <!-- JMS ConnectionFactory to use, configuring the embedded broker
> using XML -->
>   <amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>

Have a look at the Version 5 Transports page for info on the various
transports.
http://activemq.apache.org/configuring-version-5-transports.html

For the TCP transport setting the port to zero means that you want the
broker to pick an open TCP port.  Normally you wouldn't do this in the
configuration since will change every time you start the broker, this is
more useful for unit tests where you want to ensure you get an open
port.


Regards



-- 
Tim Bish
------------
FuseSource
Email: tim.bish@fusesource.com
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/




Mime
View raw message