You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "William Henry (JIRA)" <ji...@apache.org> on 2012/10/19 22:10:13 UTC
[jira] [Commented] (PROTON-46) No way to get at a message's
subscription using pn_messenger_t and pn_message_t APIs
[ https://issues.apache.org/jira/browse/PROTON-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480339#comment-13480339 ]
William Henry commented on PROTON-46:
-------------------------------------
API changes in Messenger to allow subscription tracking:
(Pseudo code)
Messenger
subscription* subscribe(addr);
void unsubscribe(subscription*);
void set_context(subscription*, void*);
void* get_context(subscription*);
Message
subscription* get_subscription(message*);
> No way to get at a message's subscription using pn_messenger_t and pn_message_t APIs
> -------------------------------------------------------------------------------------
>
> Key: PROTON-46
> URL: https://issues.apache.org/jira/browse/PROTON-46
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Reporter: William Henry
> Priority: Blocker
> Labels: api
>
> Motivation:
> Integrate with another messaging API. That other API may handle incoming messages differently based on their notion of a subscription. There is no way to know which subscription a message came in on when using the messenger API.
> It would be handier if I could just get something back form the API to help me track/lookup.
> What would be nice is two API additions.
> int pn_messenger_context_subscribe(pn_messenger_t *messenger, const char *source, void* context);
> int pn_messenger_context_get(pn_messenger_t *messenger, pn_message_t *msg, void* context);
> The get would return the context for that message based on the subscription.
> Alternatively what would be better is:
> int pn_messenger_subscribe(pn_messenger_t *messenger, const char *source,
> void* context);
> void *pn_message_subscribe_context(pn_message_t *msg);
> For C we can just leave it as NULL if we don't care about it and in the
> idiomatic APIs we can turn it into an optional argument.
> An incoming message would have it's subscription context stored with it when it arrives. No extra lookup required on the: void *pn_message_subscribe_context(pn_message_t *msg);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira