[
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16120385#comment-16120385
]
ASF GitHub Bot commented on DISPATCH-803:
-----------------------------------------
Github user ted-ross commented on a diff in the pull request:
https://github.com/apache/qpid-dispatch/pull/185#discussion_r132261405
--- Diff: src/router_core/transfer.c ---
@@ -634,6 +634,23 @@ static void qdr_link_forward_CT(qdr_core_t *core,
qdr_link_t *link, qdr_delivery
addr->deliveries_ingress++;
link->total_deliveries++;
}
+ //
+ // There is no address that we can send this delivery to, which means
the addr was not found in our hastable. This
+ // can be because there were no receivers or because the address was
not defined in the config file.
+ // If the treatment for such addresses is set to be forbidden, we send
back a rejected disposition and detach the link
+ //
+ else if (core->qd->treatment == QD_TREATMENT_LINK_FORBIDDEN) {
+ dlv->disposition = PN_REJECTED;
+ dlv->error = qdr_error("qd:forbidden", "Sending deliveries to this
address is forbidden");
--- End diff --
You should be using one of the AMQP-specified error conditions that is in
the amqp.[ch] files. It seems that the appropriate error condition is
"amqp:not-allowed", not "forbidden" (which is an error code only for the
management protocol).
> refuse attach to undefined addresses
> ------------------------------------
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
> Issue Type: Improvement
> Reporter: Gordon Sim
> Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would
> refuse links whose source/target was not explicitly defined. E.g. by being
> able to configure the default semantics to be of type 'invalid' (or anything
> similar). (Being able to explicitly blacklist certain addresses might also be
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be
> rejected.
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]