Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6003

[Java Broker] Message conversion from 1.0 to 0-10 does not convert AMQP 1.0 types in maps

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.30
    • Component/s: Broker-J
    • Labels:
      None

      Description

      When testing the 0.30 release Gordon Sim encountered the following exception

       java.lang.IllegalArgumentException: unable to resolve type: class org.apache.qpid.amqp_1_0.type.UnsignedInteger, 1
              at org.apache.qpid.transport.codec.AbstractEncoder.encoding(AbstractEncoder.java:305)
              at org.apache.qpid.transport.codec.AbstractEncoder.writeMapEntries(AbstractEncoder.java:362)
              at org.apache.qpid.transport.codec.AbstractEncoder.writeMap(AbstractEncoder.java:351)
              at org.apache.qpid.transport.codec.BBEncoder.writeMap(BBEncoder.java:35)
              at org.apache.qpid.transport.MessageProperties.write(MessageProperties.java:382)
              at org.apache.qpid.transport.codec.AbstractEncoder.writeStruct32(AbstractEncoder.java:288)
              at org.apache.qpid.transport.codec.BBEncoder.writeStruct32(BBEncoder.java:35)
              at org.apache.qpid.transport.network.Disassembler.method(Disassembler.java:214)
              at org.apache.qpid.transport.network.Disassembler.command(Disassembler.java:172)
              at org.apache.qpid.transport.network.Disassembler.command(Disassembler.java:48)
              at org.apache.qpid.transport.Method.delegate(Method.java:159)
              at org.apache.qpid.transport.network.Disassembler.send(Disassembler.java:73)
              at org.apache.qpid.transport.network.Disassembler.send(Disassembler.java:48)
              at org.apache.qpid.transport.Connection.send(Connection.java:407)
              at org.apache.qpid.server.protocol.v0_10.ServerConnection.send(ServerConnection.java:543)
              at org.apache.qpid.transport.Session.send(Session.java:602)
              at org.apache.qpid.transport.Session.invoke(Session.java:772)
              at org.apache.qpid.server.protocol.v0_10.ServerSession.sendMessage(ServerSession.java:263)
              at org.apache.qpid.server.protocol.v0_10.ConsumerTarget_0_10.send(ConsumerTarget_0_10.java:304)
              at org.apache.qpid.server.queue.QueueConsumerImpl.send(QueueConsumerImpl.java:476)
              at org.apache.qpid.server.queue.AbstractQueue.deliverMessage(AbstractQueue.java:1248)
              at org.apache.qpid.server.queue.AbstractQueue.attemptDelivery(AbstractQueue.java:2003)
              at org.apache.qpid.server.queue.AbstractQueue.processQueue(AbstractQueue.java:2170)
              at org.apache.qpid.server.queue.QueueRunner$1.run(QueueRunner.java:77)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:356)
              at org.apache.qpid.server.queue.QueueRunner.run(QueueRunner.java:68)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      

      this is due to the conversions taking a Map straight from a 1.0 message and pushing it through the 0-10 codec.

      Instead the Map should first be sanitised to convert AMQP 1.0 specific types

        Attachments

          Activity

            People

            • Assignee:
              orudyy Alex Rudyy
              Reporter:
              rgodfrey Robert Godfrey
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: