[
https://issues.apache.org/jira/browse/QPIDJMS-633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112302#comment-18112302
]
Robbie Gemmell commented on QPIDJMS-633:
----------------------------------------
[https://github.com/apache/qpid-jms/pull/73#issuecomment-5568283416]
{quote}I'll have written that mapping text after reading the same bit of the
spec, but I recall this has since been discussed a few times long ago, with
both the primary authors of the AMQP 1.0 spec indicating that their intent was
for the body sectional to be optional like all the other message sections are
(and themselves even writing earlier clients that do omit it). I know its also
been discussed as something that could be revised in the spec, should it ever
be updated.
I dont know of any other server definitely having issue with this, but am aware
of various clients (and possibly servers) that definitely can do it, so I would
actually instead suggest you make RabbitMQ tolerate this instead of giving a
decode error.
I'll think on this some more, but I'm not sure I think it makes sense to have
the clients (and potentially servers) defaulting to do the needless work of
encoding and decoding to 'convey nothing' when its been the way it has for over
a decade and various other clients have been doing the same for even longer, so
I'd possibly even make it a flag if we did it at all.
Either way, I would likely not implement it the way it has been here as a side
effect of the AmqpCodec class, but within the message objects themselves. It
would also need a Jira.
{quote}
> Qpid JMS client sends bodiless AMQP message
> -------------------------------------------
>
> Key: QPIDJMS-633
> URL: https://issues.apache.org/jira/browse/QPIDJMS-633
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 2.11.0
> Reporter: David Ansari
> Priority: Major
>
> A JMS Message created with {{Session.createMessage()}} carries no body, and
> the Qpid JMS client encodes it as an AMQP 1.0 message with no body section at
> all.
> [AMQP 1.0 section
> 3.2|https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#section-message-format]
> is unambiguous that this is not allowed: it lists every other section as
> "zero or one", but the body as one of three mandatory choices (one or more
> data sections, one or more amqp-sequence sections, or a single amqp-value
> section).
> Additionally, the AMQP JMS Mapping is explicit about which of those a
> bodiless JMS Message maps to - section 3.2.4.7 states that "a Message is
> encoded as a single amqp-value section containing null".
> Brokers that enforce this requirement therefore reject every message sent by
> {{{}Session.createMessage(){}}}; RabbitMQ, for instance, refuses the transfer
> with `amqp:decode-error "missing_amqp_message_body".
> [https://github.com/apache/qpid-jms/pull/73] suggests a fix to this bug.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]