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

Documentation uses incorrect variable in code example for Large Messaging

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.3
    • 2.0.0
    • None
    • None

    Description

      The code example for Large Messaging [1] in the "Apache ActiveMQ Artemis User Manual" uses the 'msg' variable instead of the 'msg2' variable for the 'setOutputStream()' method after this statement: "To set the output stream when receiving a core message:"

      This is the existing code example:

      ClientMessage msg = consumer.receive(...);
      
      // This will block here until the stream was transferred
      msg.saveOutputStream(someOutputStream);
      
      ClientMessage msg2 = consumer.receive(...);
      
      // This will not wait the transfer to finish
      msg.setOutputStream(someOtherOutputStream);
      

      I believe it should be:

      This is the existing code example:

      ClientMessage msg = consumer.receive(...);
      
      // This will block here until the stream was transferred
      msg.saveOutputStream(someOutputStream);
      
      ClientMessage msg2 = consumer.receive(...);
      
      // This will not wait the transfer to finish
      msg2.setOutputStream(someOtherOutputStream);
      

      [1] https://activemq.apache.org/artemis/docs/1.0.0/large-messages.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sgilda Sande Gilda
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: