activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbakkum <hayden.bak...@gmail.com>
Subject Change brokerURL for REST API connection factory
Date Fri, 05 Jul 2013 13:38:05 GMT
Hi,

I'm using a client to publish messages via the ActiveMQ REST API. I have a
single broker configured which is named *master-1*. Each time the broker
receives a message I get the following warning:

WARN  | Broker localhost not started so using master-1 instead |
org.apache.activemq.broker.BrokerRegistry 

I've had a peek at the source code and from what I can ascertain, the broker
registry is been queried for a broker named localhost which it cannot find
so instead it returns the first available broker which happens to be the
*master-1* broker (which is the only broker configured). I assume this means
that the brokerURL for the REST api connection factory being used is:
vm://localhost

I though I'd tracked down the connection factory initialization code to the
following class method: /WebClient.initConnectionFactory(ServletContext)/
which uses a servlet context parameter, /org.apache.activemq.brokerURL/, to
specify the brokerURL to use. I tried editing the api webapp web.xml to
specify a value of vm://master-1 for /org.apache.activemq.brokerURL/ but I'm
still getting the same warning in the logs, suggesting that this value is
not taking effect. However I'm not even entirely convinced that this is
where the brokerURL is being set as I cannot see any debug logging from this
method being output to the log activemq file.

Does anyone know how I can specify the brokerURL for the REST api connection
factory?

Thanks,
Hayden.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Change-brokerURL-for-REST-API-connection-factory-tp4668922.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message