[ https://issues.apache.org/jira/browse/DISPATCH-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15513971#comment-15513971 ]
ASF GitHub Bot commented on DISPATCH-160: ----------------------------------------- Github user ted-ross commented on a diff in the pull request: https://github.com/apache/qpid-dispatch/pull/101#discussion_r80095980 --- Diff: src/message.c --- @@ -787,44 +787,103 @@ static void send_handler(void *context, const unsigned char *start, int length) pn_link_send(pnl, (const char*) start, length); } +/** + * Returns true if the data backing the iterator matches any of the router specific annotations like "x-opt-qd.ingress" or + * "x-opt-qd.trace" or "x-opt-qd.to" or "x-opt-qd.phase + */ +static bool qd_message_is_router_annotation(qd_field_iterator_t *iter) +{ + bool is_router_annotation = true; + int i = 0; + while(! qd_field_iterator_end(iter)) { --- End diff -- I believe this function is not needed. But for the review, there is a bug in this algorithm. It will return 'true' if the iterator field is blank or a subset of the prefix. For example, a key of 'x-o' will be incorrectly identified as a router annotation. > Dispatch router does not propagate custom message annotations > ------------------------------------------------------------- > > Key: DISPATCH-160 > URL: https://issues.apache.org/jira/browse/DISPATCH-160 > Project: Qpid Dispatch > Issue Type: Bug > Components: Router Node, Routing Engine > Affects Versions: 0.4 > Reporter: Ganesh Murthy > Assignee: Ganesh Murthy > Priority: Critical > Fix For: 0.7.0 > > > Steps to reproduce - > Create an AMQP message with a custom message annotation - > ma['custom-annotation'] = 'Custom_Annotation Content' > Send this message via a dispatch router and receive this message. The > received message does not contain the 'custom-annotation'. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org