Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5411

MQTT Endpoint does not correctly return the MQTT-Payload

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.0
    • Fix Version/s: 2.10.1, 2.11.0
    • Component/s: camel-mqtt
    • Labels:
      None
    • Environment:

      Linux 64bit, JDK 1.6, Mosquitto MQTT Broker

    • Estimated Complexity:
      Moderate

      Description

      MQTT Endpoint does not correctly return the MQTT-Payload. It returns the whole MQTT Message (header + payload).

      The bug is in line 89 of MQTTEndpoint.java (version 2.11, but also in 2.10)

      exchange.getIn().setBody(body.getData());

      must become

      exchange.getIn().setBody(body.toByteArray());

      because getData() ignores the offset (to skip the MQTT header) set in the body byte array.

        Attachments

          Activity

            People

            • Assignee:
              rajdavies Robert Davies
              Reporter:
              ralfkornberger Ralf Kornberger

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment