Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-5105

[MQTT] Server shuts down processing received message

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      0. Create a broker instance with default configuration.
      1. Configure broker.xml setting the Journal buffer size with a small value: example <journal-buffer-size>2048</journal-buffer-size> (this is not strictly required as long as you send a message greater than the default size)
      2. A MQTT client was subscribed previously to a FOO topic, using the parameter cleanSession=false and defining a ClientID. Therefore the broker has created the associated queue for that subscriber ClientID.
      3. Create a message bigger than the journal buffer size, i.e. 2100 bytes.
      4. Send that message through MQTT protocol to the FOO topic, using the following parameters:

      • Quality of service: 2 (that's it EXACTLY_ONCE)
      • Retain flag: TRUE

      5. The broker reports ERROR and shuts down.
       

      Show
      0. Create a broker instance with default configuration. 1. Configure broker.xml setting the Journal buffer size with a small value: example <journal-buffer-size>2048</journal-buffer-size> (this is not strictly required as long as you send a message greater than the default size) 2. A MQTT client was subscribed previously to a FOO topic, using the parameter cleanSession=false and defining a ClientID. Therefore the broker has created the associated queue for that subscriber ClientID. 3. Create a message bigger than the journal buffer size, i.e. 2100 bytes. 4. Send that message through MQTT protocol to the FOO topic, using the following parameters: Quality of service: 2 (that's it EXACTLY_ONCE) Retain flag: TRUE 5. The broker reports ERROR and shuts down.  

      The broker crashes after publishing a new message using MQTT protocol if some conditions are met. One single message can make the server fails and stop.

      The errors raised in the log before stopping are:

       

       

      WARN  [org.apache.activemq.artemis.core.server] AMQ222010: Critical IO Error, shutting down the server. file=AIOSequentialFile:/home/amq-broker-7.5.0/brokers/broker01/data/journal/activemq-data-1.amq, message=Can't write records (size=4363) bigger than the bufferSize(2048) on the journal: java.lang.IllegalStateException: Can't write records (size=4363) bigger than the bufferSize(2048) on the journal
       
      ERROR [org.apache.activemq.artemis.core.journal.impl.JournalImpl] appendAddRecordTransactional:java.lang.IllegalStateException: Can't write records (size=4363) bigger than the bufferSize(2048) on the journal: java.lang.IllegalStateException: Can't write records (size=4363) bigger than the bufferSize(2048) on the journal
      

       

       
      If you send using MQTT a message meeting all of the following conditions, the broker will crash:

      • Message size greater than the configured value for the broker property <journal-buffer-size>
      • Quality of service: 2 (that's it EXACTLY_ONCE)
      • Retain flag: TRUE

       

      The error has been tested on AMQ 7.5 but it could also happen working with the latest version.

       

              rh-ee-ataylor Andy Taylor
              ryanezil Rafael Yáñez Illescas
              Roman Vais Roman Vais (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: