This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Port Offset Configuration
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. 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> <!-- 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 --> <Offset>0</Offset> <!-- The JMX Ports --> <JMX> <!--The port RMI registry is exposed--> <RMIRegistryPort>9999</RMIRegistryPort> <!--The port RMI server should be exposed--> <RMIServerPort>11111</RMIServerPort> </JMX> <!-- Embedded LDAP server specific ports --> <EmbeddedLDAP> <!-- Port which embedded LDAP server runs --> <LDAPServerPort>10389</LDAPServerPort> <!-- Port which KDC (Kerberos Key Distribution Center) server runs --> <KDCServerPort>8000</KDCServerPort> </EmbeddedLDAP> <!-- Override datasources JNDIproviderPort defined in bps.xml and datasources.properties files --> <!--<JNDIProviderPort>2199</JNDIProviderPort>--> <!--Override receive port of thrift based entitlement service.--> <ThriftEntitlementReceivePort>10500</ThriftEntitlementReceivePort> </Ports>
Â
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 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 the default Broker TCP port value for the AMQP
transport is 567
2, in this case it should be changed to 5673
. Similarly, when the MQTT
transport is used, the default Broker TCP port value 1883
should be changed to 1884
.