You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/09/01 21:53:00 UTC

[jira] [Commented] (PROTON-2427) Avoid using pn_message_id()/pn_message_correlation_id() APIs in examples and bindings

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

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

Commit 20e7e6afa5fd560d792df87a10f4db3f672fa987 in qpid-proton's branch refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=20e7e6a ]

PROTON-2427: Avoid message id/correlation id APIs returning pn_data_t

Stop using pn_message_id() and pn_message_correlation_id() APIs for
setting the message id/correlation id in the examples and in the C++
binding.

These APIs force inefficient behaviour by returning an inefficent data
structure that is internal to the message. If we stop using this API we
can do something more efficient internal to the message in many cases,
and only fall back to the inefficient behaviour when
pn_message_id()/pn_message_correlation_id() APIs are used.

We can then also deprecate these APIs.


> Avoid using pn_message_id()/pn_message_correlation_id() APIs in examples and bindings
> -------------------------------------------------------------------------------------
>
>                 Key: PROTON-2427
>                 URL: https://issues.apache.org/jira/browse/PROTON-2427
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: cpp-binding, proton-c
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Major
>
> These APIs return a pn_data_t to represent a message id/correlation id which has a very restricted set of possible values. All of which are simple scalars - ulong, uuid, binary and string. There is already a setter/getter API that returns a pn_atom_t which is a much simpler and more efficient representation, so we should use this.
> We can make up the small API lack of pn_atom_t by introducing some pn_atom_put/get_ulong/uuid/string/binary APIs. But initially pn_atom_t is easy enough to construct/deconstruct especially with C99 structure initiialisers.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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