William Henry created PROTON-46: ----------------------------------- Summary: 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
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