JNDI Replication into a LDAP Server


SwiftMQ's JNDI replication can be used to replicate its JNDI content into a LDAP server. Due to LDAP naming conventions, this requires some special configurations.


Create a new JNDI replication either with SwiftMQ Explorer/CLI or directly in the routerconfig.xml.


    <swiftlet name="sys$jndi">
        <alias name="testqueue" map-to="testqueue@router1"/>
        <jndi-replication name="netscape" enabled="true"
                           keepalive-lookup-name="cn=testtopic" name-prefix="cn=">
            <environment-property name="java.naming.factory.initial"
            <environment-property name="java.naming.provider.url"
            <environment-property name="java.naming.security.authentication"
            <environment-property name="java.naming.security.credentials"
            <environment-property name="java.naming.security.principal"
                                  value="cn=Directory Manager"/>
        <remote-queue name="testqueue@router2"/>

The above example uses the Nescape Directory Server, connects to localhost at port 389 and uses the root context with name "SwiftMQ".

Important configuration issues:

  • Don't specify a "destination-context". Instead, append the destination context to the provider URL ("/o=SwiftMQ").
  • Set the value of attribute "name-prefix" to "cn=". This is the RDN, required in LDAP naming operations.
  • Use a "cn=" prefix for the keepalive-lookup-name as well ("cn=testtopic").

It is recommended to enable the "jndi" trace space in the Trace Swiftlet during the configuration to see what's going on during the replication.