Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1184

Large MQTT publish packet size fails when using QoS 1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: MQTT
    • Labels:
      None

      Description

      Attempting to publish an MQTT packed sized at roughly 1.9MB works when sending over QoS 0, but when attempting to publish on QoS 1, the publication fails. MQTT specification seems to allow for messages up to the size of 256MB, and we have been able to use other MQTT brokers (Mosquitto) to send this size of packet in the past.

      artemis.log

      13:52:05,883 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
      13:52:05,896 INFO [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging)
      13:52:05,932 INFO [org.apache.activemq.artemis.core.server] AMQ221013: Using NIO Journal
      13:52:05,971 INFO [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 477,364,224
      13:52:05,993 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
      13:52:05,994 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
      13:52:05,994 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
      13:52:05,994 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
      13:52:05,994 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
      13:52:05,995 INFO [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
      13:52:06,057 INFO [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain live lock
      13:52:06,058 INFO [org.apache.activemq.artemis.core.server] AMQ221035: Live Server Obtained live lock
      13:52:08,136 ERROR [org.apache.activemq.artemis.core.server] AMQ224009: Cannot find message 51
      13:52:08,202 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue DLQ
      13:52:08,204 INFO [org.apache.activemq.artemis.core.server] AMQ221003: Deploying queue ExpiryQueue
      13:52:10,130 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
      13:52:10,146 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:5445 for protocols [HORNETQ,STOMP]
      13:52:10,160 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:5672 for protocols [AMQP]
      13:52:10,174 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:1883 for protocols [MQTT]
      13:52:10,189 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started NIO Acceptor at 0.0.0.0:61613 for protocols [STOMP]
      13:52:10,191 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
      13:52:10,191 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.1.0 [0.0.0.0, nodeID=fa30922b-416c-11e7-8816-e8b1fcef7ed2]
      13:52:11,487 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://localhost:8161
      13:52:11,487 INFO [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://localhost:8161/jolokia
      13:54:42,018 ERROR [org.apache.activemq.artemis.core.journal.impl.JournalImpl] appendAddRecord::java.lang.IllegalStateException: Can't write records bigger than the bufferSize(501760) on the journal: java.lang.IllegalStateException: Can't write records bigger than the bufferSize(501760) on the journal
      at org.apache.activemq.artemis.core.io.buffer.TimedBuffer.checkSize(TimedBuffer.java:188) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.core.io.AbstractSequentialFile.fits(AbstractSequentialFile.java:168) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl.switchFileIfNecessary(JournalImpl.java:2875) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendRecord(JournalImpl.java:2597) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl.access$200(JournalImpl.java:88) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl$1.run(JournalImpl.java:744) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-2.1.0.jar:2.1.0]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_74]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_74]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_74]

      13:54:42,023 WARN [org.apache.activemq.artemis.core.server] AMQ222057: It was not possible to add references due to an IO error code 6 message = null
      13:54:42,024 WARN [org.apache.activemq.artemis.core.server] AMQ222104: IO Error completing the transaction, code = 6, message = null
      13:54:42,024 ERROR [org.apache.activemq.artemis.core.protocol.mqtt] Pub Sync Failed
      13:54:42,024 ERROR [org.apache.activemq.artemis.core.journal.impl.JournalImpl] appendUpdateRecord:java.lang.NullPointerException: java.lang.NullPointerException
      at org.apache.activemq.artemis.core.journal.impl.JournalImpl$2.run(JournalImpl.java:809) [artemis-journal-2.1.0.jar:2.1.0]
      at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-2.1.0.jar:2.1.0]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_74]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_74]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_74]

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              engelkj Justin Engelking
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: