dlite922
dlite922

Reputation: 1994

activemq brokerName always localhost?

This may be a n00b question, I've installed activemq on CentoOS and when i start it like so setting the brokerName to "Test":

 sudo activemq start broker:tcp://localhost:61666?brokerName=Test&persistent=true&useJmx=false

Then query it:

sudo activemq query

The broker name is always "localhost"...

....
QueueSubscribers = []
Topics = [org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Topic,destinationName=ActiveMQ.Advisory.MasterBroker]
TotalMessageCount = 0
SslURL =
TemporaryQueueSubscribers = []
BrokerName = localhost <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<HERE
DynamicDestinationProducers = []
Persistent = true
DataDirectory = /etc....
....

Can someone shed some light? When I connect using JMS API in an example Java class, specificing the full URL like above puts it in that broker? is this to have multiple brokers with different names?

Thanks for any clarifications,

Upvotes: 2

Views: 3143

Answers (1)

Petter Nordlander
Petter Nordlander

Reputation: 22279

Acording to the docs, the URI format is:

broker:(transportURI,network:networkURI)/brokerName?brokerOptions

So, in your case:

broker:(tcp://localhost:61666)/Test&persistent=true&useJmx=false

Disclaimer: Haven't verified it.

Another, perhaps better, way is to point out a config XML instead of an URI. That gives you more fine grained control over everything.

Upvotes: 1

Related Questions