Uploaded image for project: 'AMQ Clients'
  1. AMQ Clients
  2. ENTMQCL-2973

[j2] Wrong types for Message#priority and Message#groupSequence

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • protonj2
    • None
    • False
    • False

      According to AMQP 1.0, the type for message priority is ubyte and the type for group sequence is uint. In Proton J2, they are mapped to byte and int, respectively. This does not look right to me, because the Proton J2 types do not fully cover the range of the AMQP types.

      Am I expected to treat the values as unsigned? I am aware of some support for Unsigned Int arithmetic in Java 8+. It would make more sense to me to use signed int and long types for these values in the API.

      Looking at the group-sequence implementation, I feel that my interpretation in the previous paragraph is correct. I do not see similar provisions for dealing with unsigned byte in the priority case, however.

              rhn-support-tbish Tim Bish
              jdanek@redhat.com Jiri Daněk
              Jiri Daněk Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: