Description
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:
[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}
Creating a receiving link, response attach with non-null Source:
[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}
The links are detached after this, but the non-null terminus removes the hint to the peer that it is coming.
Attachments
Issue Links
- relates to
-
QPIDJMS-376 notify the ExceptionListener when a consumer with a MessageListener remotely closes
- Closed
-
DISPATCH-803 refuse attach to undefined addresses
- Closed