in src/NMS.AMQP/Provider/Amqp/AmqpConsumer.cs [126:160]
private OnAttached HandleOpened(TaskCompletionSource<bool> tsc) => (link, attach) =>
{
if (validateSharedSubsLinkCapability)
{
Symbol[] remoteOfferedCapabilities = attach.OfferedCapabilities;
bool supported = false;
if (remoteOfferedCapabilities != null)
{
if (Array.Exists(remoteOfferedCapabilities, symbol => SymbolUtil.OPEN_CAPABILITY_SHARED_SUBS.Equals(symbol)))
{
supported = true;
}
}
if (!supported)
{
sharedSubsNotSupported = true;
if (info.IsDurable)
{
link.Detach(null);
}
else
{
link.Close();
}
}
}
if (IsClosePending(attach))
return;
tsc.SetResult(true);
};