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

[Java Broker] In AMQP 1.0 fix handling of channel Id > 2^15

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • qpid-java-broker-7.0.0
    • Broker-J
    • None

    Description

      In AMQP 1.0 the channel ID is an Unsigned Short, i.e. 0 <= x < 2^16
      However in the amqp 1.0 plugin the channel is modeled as a java short which is signed and thus in the range -2^15 <= x < 2^15.
      This causes some problems if the channel id exceeds 2^15. Some issues are minor like the error statement in AMQPConnection_1_0Impl#getSession taking on a negative value but some will be more unfortunate like the ArrayIndexOutOfBoundsException earlier in the same method (will fail the session Begin and close the connection).

      There are several possible solutions:

      • handle the unsigned short correctly (either as UnsignedShort or as int)
      • enforce a max-channel of 2^15 - 1 on connection Open

      Attachments

        Activity

          People

            orudyy Alex Rudyy
            lorenz.quack Lorenz Quack
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: