Closed dnwe closed 8 years ago
@dnwe agreed. In fact the definition of the performative indicates an additional error
field which we should support from the public API:
<type name="detach" class="composite" source="list" provides="frame">
<descriptor name="amqp:detach:list" code="0x00000000:0x00000016"/>
<field name="handle" type="handle" mandatory="true"/>
<field name="closed" type="boolean" default="false"/>
<field name="error" type="error"/>
</type>
The error type should probably be required to be e.g. an errors.ProtocolError
.
Currently the internal Link detach operation has a hard-coded value of
closed=true
Ideally it would be possible to override this as a parameter to the public Link.prototype.detach function. The use case for this is on a receiver Link where it may be used to indicate whether a durable subscription with remaining ttl should continue to store messages at the remote end (ready for delivery at re-attachment) or whether it should be deleted.