[ 
https://issues.apache.org/jira/browse/PROTON-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309157#comment-14309157
 ] 

ASF subversion and git services commented on PROTON-775:
--------------------------------------------------------

Commit 4e12b3a064bc8f0481da31c59cfe6b9e6e0a0263 in qpid-proton's branch 
refs/heads/master from [~mcpierce]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=4e12b3a ]

PROTON-775: Ensure that annotation keys in Ruby are encoded as symbols.

The AMQP protocol requires that the keys for message annotations be
encoded as symbols rather than strings. This change ensures that keys
are properly encoded before the message is sent.


> ruby: message annotations send from a ruby client are invalid
> -------------------------------------------------------------
>
>                 Key: PROTON-775
>                 URL: https://issues.apache.org/jira/browse/PROTON-775
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: ruby-binding
>    Affects Versions: 0.8
>            Reporter: Dominic Evans
>            Assignee: Darryl L. Pierce
>         Attachments: 
> 0001-PROTON-775-Ensure-that-annotation-keys-in-Ruby-are-e.patch
>
>
> Since PROTON-616, proton-j has attempted to enforce the fact that the key's 
> of a message annotations map *must* be of the Symbol type (or actually ulong, 
> but those are reserved so we don't need to worry about that) [1]
> Unfortunately, from the Ruby client, the mapping of a native map into proton 
> data always sets the key's as strings rather than symbols.
> In proton-j, you'll currently hit a `java.lang.ClassCastException: 
> java.lang.String incompatible with org.apache.qpid.proton.amqp.Symbol` if you 
> try to look at keys of the MessageAnnotations object of a message sent from 
> the ruby send.rb example (which sets message annotations for the keys 
> 'version' and 'pill').
> -- 
> [1] 
> http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-annotations
>    



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to