qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Giusti (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PROTON-2085) The minimal encoded proton message does not conform to the standard
Date Wed, 07 Aug 2019 15:12:01 GMT
Ken Giusti created PROTON-2085:

             Summary: The minimal encoded proton message does not conform to the standard
                 Key: PROTON-2085
                 URL: https://issues.apache.org/jira/browse/PROTON-2085
             Project: Qpid Proton
          Issue Type: Bug
          Components: proton-c
    Affects Versions: proton-c-0.28.0
            Reporter: Ken Giusti
             Fix For: proton-c-future

To create the smallest "on the wire" AMQP message using proton-c:

char *buffer[10000]'
pn_message_t *pn_msg = pn_message();
size_t size = 10000;
int result = pn_message_encode(pn_msg, buffer, &size);

results in an encoded message of 8 bytes:

(gdb) p result
$1 = 0
(gdb) p size
$2 = 8
(gdb) x/8xb buffer
0x60f280 <buffer>:	0x00	0x53	0x70	0x45	0x00	0x53	0x73	0x45

The encoded message consists of:

1) a Header section composed of a null list
2) a Properties section composed of a null list

Note there is no body section.

However, from the AMQP 1.0 spec [Message Format|http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format]

 The exact structure of a message, together with its encoding, is defined by the message format.
This document defines the structure and semantics of message format 0 (MESSAGE-FORMAT). Altogether
a message consists of the following sections:

{quote}    Zero or one header sections.

    Zero or one delivery-annotation sections.

    Zero or one message-annotation sections.

    Zero or one properties sections.

    Zero or one application-properties sections.

    The body consists of one of the following three choices: one or more data sections, one
or more amqp-sequence sections, or a single amqp-value section.

    Zero or one footer sections.{quote}

So while the null header and property sections are legal (though unnecessary), the real issue
is the lack of a body section.

I would've expected at least a body section 0x77 containing a NULL, or a 0x76 with a NULL

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org

View raw message