Hi,
I need to use network of brokers each of them is requires
authentication. Configuration of first broker looks like:
<beans xmlns="http://activemq.org/config/1.0">
<broker name="m0" persistent="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:0"
discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
<plugins>
<jaasAuthenticationPlugin configuration="activemq-domain"
/>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry topic=">" read="admins"
write="admins" admin="admins" />
<authorizationEntry topic="monitoring.>"
read="consumers" write="producers" admin="producers,consumers,admins" />
<authorizationEntry queue="monitoring.>"
read="consumers" write="producers" admin="producers,consumers,admins" />
<authorizationEntry
topic="ActiveMQ.Advisory.>" read="producers,consumers"
write="producers,consumers" admin="producers,consumers"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
</broker>
</beans>
Second broker configuration is the same but broker name is m1. I can
start broker m0 without any errors. After second broker start I got:
INFO BrokerService - ActiveMQ null JMS Message Broker
(localhost) is starting
INFO BrokerService - For help or more information
please see: http://incubator.apache.org/activemq/
INFO ManagementContext - JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO TransportServerThreadSupport - Listening for connections at:
tcp://m0.ats-network.stc.donpac.ru:57500
WARN MulticastDiscoveryAgent - brokerName not set
INFO TransportConnector - Connector tcp://localhost:0 Started
INFO NetworkConnector - Network Connector bridge Started
INFO BrokerService - ActiveMQ JMS Message Broker
(localhost, ID:m0.ats-network.stc.donpac.ru-58271-1155128478125-0:0) started
setting based dir=/home/john/AMQ/conf
WARN Service - Failed to remove connection
ConnectionInfo {commandId = 1, responseRequired = false, connectionId =
ID:m1.ats-network.stc.donpac.ru-39196-1155128513928-3:0, clientId =
NC_localhost_outboundlocalhost, userName = null, password = null,
brokerPath = null, brokerMasterConnector = false, manageable = false}
java.lang.SecurityException: User is not authenticated.
...
So, how can I connect brokers to each other? Can I modify
networkConnector uri or setup username and password in another way?
--
Thanks,
Eugene Prokopiev