[ https://issues.apache.org/jira/browse/DISPATCH-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434629#comment-16434629 ]
Robbie Gemmell commented on DISPATCH-962: ----------------------------------------- The presence of address='null' will just be part of proton-j's string representation of the source object, it isnt jumping through hoops to avoid printing "address=..." if null (not-set) is the value of the address field, but rather showing the current value (in Java terms) of the field, and so the string rep presumably cant differentiate between string "null" and address-not-set null. I am arguing that the source (for consumers) or target (for producers) should not be present in the returned attach when refusing the link, per the the spec this is how its indicated that no terminus exists and the link is going to be detached. I have made similar reports a few times before against Dispatch. I believe the first of those was handled through a change within proton by Gordon around setting a null source/target, but the others were handled with changes in Dispatch. Maybe there is still some related proton-c behaviour that can be improved, but it seems Dispatch can ensure the correct behaviour occurs for its clients. > links established to 'unavailable' addresses are not refused correctly > ---------------------------------------------------------------------- > > Key: DISPATCH-962 > URL: https://issues.apache.org/jira/browse/DISPATCH-962 > Project: Qpid Dispatch > Issue Type: Bug > Affects Versions: 1.0.0, 1.0.1, 1.1.0 > Reporter: Robbie Gemmell > Assignee: Ganesh Murthy > Priority: Major > > When setting an address as unavailable (via defaultDistribution: unavailable > from DISPATCH-803) the router doesn't refuse the links to it in the manner > the spec indicates it should. > To indicate a link is being refused, the spec describes that the attach > response should contain a null target/source as appropriate, essentially > indicating to the peer that the detach will follow due to the error, > [http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#doc-idp315568], > Figure 2.33: Refusing a Link. > Currently this does not happen, e.g: > Creating a sending link, response attach with non-null Target: > {noformat} > [750316387:1] -> > Attach{name='qpid-jms:sender:ID:07e5feb4-d047-4d55-90e4-e67887f9a06a:1:1:1:queue', > handle=0, role=SENDER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, > source=Source{address='ID:07e5feb4-d047-4d55-90e4-e67887f9a06a:1:1:1', > durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, > dynamicNodeProperties=null, distributionMode=null, filter=null, > defaultOutcome=null, outcomes=[amqp:accepted:list, amqp:rejected:list, > amqp:released:list, amqp:modified:list], capabilities=null}, > target=Target{address='queue', durable=NONE, expiryPolicy=SESSION_END, > timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=[queue]}, > unsettled=null, incompleteUnsettled=false, initialDeliveryCount=0, > maxMessageSize=null, offeredCapabilities=null, > desiredCapabilities=[DELAYED_DELIVERY], properties=null} > [750316387:1] <- > Attach{name='qpid-jms:sender:ID:07e5feb4-d047-4d55-90e4-e67887f9a06a:1:1:1:queue', > handle=0, role=RECEIVER, sndSettleMode=MIXED, rcvSettleMode=FIRST, > source=Source{address='null', durable=NONE, expiryPolicy=SESSION_END, > timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, > filter=null, defaultOutcome=null, outcomes=null, capabilities=null}, > target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, > timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, > unsettled=null, incompleteUnsettled=false, initialDeliveryCount=0, > maxMessageSize=0, offeredCapabilities=null, desiredCapabilities=null, > properties=null} > {noformat} > Creating a receiving link, response attach with non-null Source: > {noformat} > [59324032:1] -> > Attach{name='qpid-jms:receiver:ID:30b1b1c9-316b-4be1-9944-15b5822a6500:1:1:1:queue', > handle=0, role=RECEIVER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST, > source=Source{address='queue', durable=NONE, expiryPolicy=LINK_DETACH, > timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, > filter=null, defaultOutcome=Modified{deliveryFailed=true, > undeliverableHere=null, messageAnnotations=null}, > outcomes=[amqp:accepted:list, amqp:rejected:list, amqp:released:list, > amqp:modified:list], capabilities=[queue]}, target=Target{address='null', > durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, > dynamicNodeProperties=null, capabilities=null}, unsettled=null, > incompleteUnsettled=false, initialDeliveryCount=null, maxMessageSize=null, > offeredCapabilities=null, desiredCapabilities=null, properties=null} > [59324032:1] <- > Attach{name='qpid-jms:receiver:ID:30b1b1c9-316b-4be1-9944-15b5822a6500:1:1:1:queue', > handle=0, role=SENDER, sndSettleMode=MIXED, rcvSettleMode=FIRST, > source=Source{address='null', durable=NONE, expiryPolicy=SESSION_END, > timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, > filter=null, defaultOutcome=null, outcomes=null, capabilities=null}, > target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, > timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}, > unsettled=null, incompleteUnsettled=false, initialDeliveryCount=0, > maxMessageSize=0, offeredCapabilities=null, desiredCapabilities=null, > properties=null} > {noformat} > The links are detached after this, but the non-null terminus removes the hint > to the peer that it is coming. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org