anchor.diff:                  </trustStore>
               </sslConnection>
   
  -            <!--Ring buffer size of MQTT inbound event disruptor. Default is set to 32768 (1024 * 32)
  +            <!--All receiving events/messages will be in this ring buffer. Ring buffer size of MQTT inbound event disruptor. Default is set to 32768 (1024 * 32)
               Having a large ring buffer will have a increase memory usage and will improve performance
               and vise versa -->
               <inboundBufferSize>32768</inboundBufferSize>
   
  -            <!--Ring buffer size of MQTT delivery event disruptor. Default is set to 32768 (1024 * 32)
  +            <!--Messages delivered to clients will be placed in this ring buffer. Ring buffer size of MQTT delivery event disruptor. Default is set to 32768 (1024 * 32)
               Having a large ring buffer will have a increase memory usage and will improve performance
               and vise versa -->
               <deliveryBufferSize>32768</deliveryBufferSize>
  -            
  +
   
               <security>
                      <!--
                          Instructs the MQTT server whether clients should always send credentials
                          when establishing a connection.
                          Possible values:
  -                        OPTIONAL: This is the default value. MQTT clients may or may not send 
  -                                  credentials. If a client sends credentials server will 
  -                                  validates it. 
  -                                  If client doesn't send credentials then server will not 
  -                                  authenticate, but allows client to establish the connection. 
  +                        OPTIONAL: This is the default value. MQTT clients may or may not send
  +                                  credentials. If a client sends credentials server will
  +                                  validates it.
  +                                  If client doesn't send credentials then server will not
  +                                  authenticate, but allows client to establish the connection.
                                     This behavior adheres to MQTT 3.1 specification.
  -                        REQUIRED: Clients should always provide credentials when connecting. 
  -                                  If client doesn't send credentials or they are invalid 
  +                        REQUIRED: Clients should always provide credentials when connecting.
  +                                  If client doesn't send credentials or they are invalid
                                     server rejects the connection.
                      -->
  -                   <authentication>OPTIONAL</authentication>
  -                  
  -                   <!--Class name of the authenticator to use. class should 
  +                   <authentication>REQUIRED</authentication>
  +
  +                   <!--Class name of the authenticator to use. class should
                          inherit from org.dna.mqtt.moquette.server.IAuthenticator
                          Note: default implementation authenticates against carbon user store
                          based on supplied username/password
  -                   --> 
  -                   <authenticator>org.wso2.carbon.andes.authentication.andes.CarbonBasedMQTTAuthenticator</authenticator>
  +                   -->
  +
  +                   <authenticator class="org.wso2.carbon.andes.authentication.andes.OAuth2BasedMQTTAuthenticator">
  +                       <property name="hostURL">https://localhost:9443/services/OAuth2TokenValidationService</property>
  +                       <property name="username">admin</property>
  +                       <property name="password">admin</property>
  +                       <property name="maxConnectionsPerHost">10</property>
  +                       <property name="maxTotalConnections">150</property>
  +                   </authenticator>
  +
  +                   <!--
  +                      Instructs the MQTT server whether clients should be authorized before either publishing or subscribing
  +                      Possible values:
  +                       NOT_REQUIRED: This is the default value. MQTT clients will skip the authorization check
  +                       REQUIRED: Clients will authorized before publishing. this will execute the class given in authorzier
  +                       Note: authentication should be REQUIRED for authorization to be REQUIRED.
  +                  -->
  +                   <authorization>REQUIRED</authorization>
  +
  +                   <!--Class name of the authorizer to use. class should
  +                       inherit from org.dna.mqtt.moquette.server.IAutherizer
  +                       Note: default implementation authorizes against carbon permission with the topic.
  +                   -->
  +                   <!--connectionPermission is required for a user to connect to broker-->
  +                   <authorizer class="org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.DeviceAccessBasedMQTTAuthorizer">
  +                       <property name="connectionPermission">/permission/admin/device-mgt/user</property>
  +                       <property name="adminPermission">/permission/admin/device-mgt/admin</property>
  +                       <property name="MQTTSubscriberScopeIdentifier">mqtt-subscriber</property>
  +                       <property name="MQTTPublisherScopeIdentifier">mqtt-subscriber</property>
  +                       <property name="devicemgtScopeIdentifier">device-mgt</property>
  +                   </authorizer>
               </security>
   
           </mqtt>
  
positive.code:             on the data store will increase. -->
              <parallelContentReaders>5</parallelContentReaders>
  
              <!-- Number of parallel delivery handlers used to send messages to subscribers.
              Increasing this value will speed-up the message sending mechanism. But the system load
              will increase. -->
              <parallelDeliveryHandlers>5</parallelDeliveryHandlers>
  
              <!-- The size of the batch represents, at a given time the number of messages that could 
              be retrieved from the database. -->
              <contentReadBatchSize>65000</contentReadBatchSize>
  
              <contentCache>
                  <!-- Specify the maximum number of entries the cache may contain. -->
                  <maximumSize>100</maximumSize>
                  <!-- Specify the time in seconds that each entry should be 
                       automatically removed from the cache after the entry's creation. -->
                  <expiryTime>120</expiryTime>
              </contentCache>
  
              <!--When delivering topic messages to multiple topic 
                  subscribers one of following stratigies can be choosen.
              
                 1. DISCARD_NONE     - Broker do not loose any message to any subscriber. 
                                       When there are slow subscribers this can cause broker 
                                       go Out of Memory.
  
                 2. SLOWEST_SUB_RATE - Broker deliver to the speed of the slowest
  
negative.code:             store large content chunks converted to smaller content chunks within the DB with this
              parameter. -->
              <maxContentChunkSize>65500</maxContentChunkSize>
  
              <!-- This is the configuration to allow compression of message contents, before store messages
              into the database.-->
              <allowCompression>false</allowCompression>
  
              <!-- This is the configuration to change the value of the content compression threshold (in bytes).
              Message contents less than this value will not compress, even compression is enabled. The recommended
              message size of the smallest message before compression is 13bytes. Compress messages smaller than
              13bytes will expand the message size by 0.4% -->
              <contentCompressionThreshold>1000</contentCompressionThreshold>
  
          </contentHandling>
  
          <inboundEvents>
  