On Wed, Sep 28, 2011 at 3:33 PM, Timothy Bish <[email protected]> wrote:
> 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.
>
>
I couldn't get answer to my point 1 and 2
1. what's the different between uri="tcp://localhost:0" and
brokerURL="vm://localhost" ?
<amq:broker id="BridgeBroker" useJmx="true" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
<!-- JMS ConnectionFactory to use, configuring the embedded broker
using XML -->
<amq:connectionFactory id="BridgeJmsFactory" brokerURL="vm://bridgehost"/>
2. In point 1 why are both not tcp?
3. And in point 1 how is broker getting associated with the
connectionfactory since url is different?
> Regards
>
>
>
> --
> Tim Bish
> ------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: tabish121
> Blog: http://timbish.blogspot.com/
>
>
>
>