[
https://issues.apache.org/jira/browse/QPIDJMS-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151837#comment-18151837
]
Gabriel Hall commented on QPIDJMS-327:
--------------------------------------
Regarding the content-type part of this: the CloudEvents AMQP binding carries
the event's datacontenttype in properties.content-type, so a JMS client can't
produce or consume binary-mode CloudEvents today. The
CloudEvents maintainers didn't want a JMS-specific workaround in their spec and
asked me to raise it here: https://github.com/cloudevents/spec/issues/1405.
(QPIDJMS-636 is my duplicate of this.)
What I have in mind is a \{{JMS_AMQP_ContentType}} property handled in
\{{AmqpJmsMessagePropertyIntercepter}}, the same way as
\{{JMS_AMQP_TYPED_ENCODING}}, using the name ActiveMQ already uses. Setting it
would only be allowed on a BytesMessage, since that's the only type the client
sends as a Data section; other types would get a MessageFormatException, like
JMS_AMQP_TYPED_ENCODING does outside ObjectMessage. On send,
{\{AmqpJmsBytesMessageFacade.onSend}} already keeps an existing content type
and only defaults to application/octet-stream when none is set, so the default
doesn't change. On receive it would just return
properties.content-type. Message type selection stays as it is, since the
client's own messages carry x-opt-jms-msg-type and others still go through
createWithoutAnnotation.
On encryption, I'd see the value as describing the plaintext payload. An
encryption layer would need to own content-type for the messages it encrypts
either way.
Content-encoding could follow the same pattern alongside
https://github.com/apache/qpid-jms/pull/52.
> QPid JMS has no support for the content-type AMQP properties
> ------------------------------------------------------------
>
> Key: QPIDJMS-327
> URL: https://issues.apache.org/jira/browse/QPIDJMS-327
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Reporter: Leo Riguspi
> Priority: Major
>
> The content-type AMQP property cannot be set. According to the specifications
> it should be set via the Jms property JMS_AMQP_ContentType, however this
> results in nothing being set.
> NOTE: there is a similar issue (albeit different) for the content-encoding
> property (see [https://issues.apache.org/jira/browse/QPIDJMS-295])
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]