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

STOMP component does not handle stream objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16.1
    • 2.16.2, 2.17.0
    • camel-stomp
    • None
    • Moderate

    Description

      The STOMP component only performs a very simple toString() on the body of the incoming exchange when it creates a STOMP message. This does not work when the body does not support a toString() which gives some reasonable human readable representation of the object. This is exactly the case if you try to do the following:

      from("direct:a").marshal().json(JsonLibrary.Gson).to("stomp:topic:foobar")
      

      The result of the JSON serialization is a Stream, and the toString() on a Stream results in an object hash (e.g. "[B@30479402"). A more appropriate thing to do here is similar to what the File component does. (Basically, read the stream for the data.)

      Attachments

        Activity

          People

            njiang Willem Jiang
            ceosion Alex Ford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: