Configuring network topologies can be quite tedious when the number of brokers in the system is large. To help ease the configuration overhead for these types of situations, a broker can be configured to look up its broker connections using a LDAP v3 directory server. Note The basic feature was added to satisfy AMQ-358. There are known problems and limitations with this implementation. These deficiencies have been addressed in AMQ-1587. The features discussed on this page require the patch attached to JIRA issue AMQ-1587. This patch should apply cleanly to the ActiveMQ 5.0.0 release or the current development trunk. LDAP v3 Directory Server ComplianceThe following table lists a known subset of directory servers and their compliance to work with the LDAP discovery feature. Most LDAP v3 directory servers will support this feature if they properly implement the RFC2307 schemas. In order to support the persistent search capabilities the server must implement the extension defined in draft-ietf-ldapext-psearch-03.txt.
LDAP v3 directory server which do not support RFC2307 by default. Support can be added by manually importing them. See vendor specific setup requirements on how to do this. LDAP Network Connector Properties
Other Properties All of the properties defined in Networks of Brokers are also available to the ldapNetworkConnector. Any of the properties defined for a normal networkConnector will be used as connection parameters to any discovered brokers matching the search criteria. Example 1: Simple Network of BrokersNetwork Configuration
ActiveMQ Configuration (activemq.xml)srv-a.mydomain.com <broker brokerName="srv-a.mydomain.com" ...> ... <networkConnectors> <ldapNetworkConnector uri="ldap://myldap.mydomain.com:389" base="dc=brokers,dc=mydomain,dc=com" anonymousAuthentication="true" searchFilter="(cn=*)" searchScope="SUBTREE_SCOPE" /> </networkConnectors> ... </broker> srv-b.mydomain.com <broker brokerName="srv-b.mydomain.com" ...> ... <networkConnectors/> <!-- NO NETWORK CONNECTORS --> </networkConnectors> ... </broker> Example 2: Larger Network of BrokersNetwork Configuration
ActiveMQ Configuration (activemq.xml)srv-a.mydomain.com <broker brokerName="srv-a.mydomain.com" ...> ... <networkConnectors> <ldapNetworkConnector uri="ldap://myldap.mydomain.com:389" base="dc=brokers-for-srv-a,dc=mydomain,dc=com" anonymousAuthentication="true" searchFilter="(cn=*)" searchScope="SUBTREE_SCOPE" networkTTL="2" /> <!-- networkTTL=2 since we want messages to flow from srv-a to srv-c --> </networkConnectors> ... </broker> srv-b.mydomain.com <broker brokerName="srv-b.mydomain.com" ...> ... <networkConnectors/> <ldapNetworkConnector uri="ldap://myldap.mydomain.com:389" base="dc=brokers-other,dc=mydomain,dc=com" anonymousAuthentication="true" searchFilter="(cn=*)" searchScope="SUBTREE_SCOPE" /> </networkConnectors> ... </broker> srv-c.mydomain.com <broker brokerName="srv-c.mydomain.com" ...> ... <networkConnectors/> <!-- NO NETWORK CONNECTORS --> </networkConnectors> ... </broker> srv-d.mydomain.com <broker brokerName="srv-d.mydomain.com" ...> ... <networkConnectors/> <ldapNetworkConnector uri="ldap://myldap.mydomain.com:389" base="dc=brokers-other,dc=mydomain,dc=com" anonymousAuthentication="true" searchFilter="(cn=*)" searchScope="SUBTREE_SCOPE" /> </networkConnectors> ... </broker> |