Unknown macro: {search-box}
Child pages
  • Port Offset Configuration

This documentation is for WSO2 Message Broker version 2.1.1. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

Changing the Default Port of WSO2 Message Broker

Like other WSO2 products, Message Broker also uses the 9443 port in the default configuration. However, there can be instances where this default port needs to be changed. To start MB in a different port, change the <Offset> entry in the <MB_HOME>/repository/conf/carbon.xml file.

The following block handles the port configurations in the carbon.xml file:

        <!-- Ports offset. This entry will set the value of the ports defined below to
         the define value + Offset.
         e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
        <!-- The JMX Ports -->
            <!--The port RMI registry is exposed-->
            <!--The port RMI server should be exposed-->
        <!-- Embedded LDAP server specific ports -->
            <!-- Port which embedded LDAP server runs -->
            <!-- Port which KDC (Kerberos Key Distribution Center) server runs -->
        <!-- Embedded Qpid broker ports -->
        <!-- Broker TCP Port -->
        <!-- SSL Port -->
             Override datasources JNDIproviderPort defined in bps.xml and datasources.properties files
    <!--Override receive port of thrift based entitlement service.-->

If you are using an external Cassandra server and changed the default port as mentioned above, then you also need to change the <connectionString> entry in the <MB_HOME>/repository/conf/advanced/qpid-virtualhosts file to point to the same port.

Configuring a Client to Access Broker When Port Offset is Changed

As the Message Broker's port offset is changed, the default TCP Port of the broker also gets increased by the value set as the port offset. Hence when using an external client to connect with the broker, TCP connection url's port should be changed to reflect the port offset value's change.

Therefore if <Offset> is set as '1' , the TCP Connection URL which is in the form of " amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port}" must be changed to "amqp://{username}:{password}@carbon/carbon?brokerlist='tcp://{hostname}:{port+1}" from this onwards.

As default Broker TCP Port value is 5672 in this case it must be changed into 5673.

  • No labels