in src/NMS.AMQP/Provider/Amqp/AmqpConnection.cs [128:175]
internal void OnRemoteOpened(Open open)
{
if (SymbolUtil.CheckAndCompareFields(open.Properties, SymbolUtil.CONNECTION_ESTABLISH_FAILED, SymbolUtil.BOOLEAN_TRUE))
{
Tracer.InfoFormat("Open response contains {0} property the connection {1} will soon be closed.",
SymbolUtil.CONNECTION_ESTABLISH_FAILED, Info.Id);
}
else
{
Symbol[] capabilities = open.OfferedCapabilities;
if (capabilities != null)
{
if (Array.Exists(capabilities,
symbol => Equals(symbol, SymbolUtil.OPEN_CAPABILITY_ANONYMOUS_RELAY)))
{
Info.AnonymousRelaySupported = true;
}
if (Array.Exists(capabilities,
symbol => Equals(symbol, SymbolUtil.OPEN_CAPABILITY_DELAYED_DELIVERY)))
{
Info.DelayedDeliverySupported = true;
}
if (Array.Exists(capabilities,
symbol => Equals(symbol, SymbolUtil.OPEN_CAPABILITY_SHARED_SUBS)))
{
Info.SharedSubsSupported = true;
}
}
object value = SymbolUtil.GetFromFields(open.Properties, SymbolUtil.CONNECTION_PROPERTY_TOPIC_PREFIX);
if (value is string topicPrefix)
{
Info.TopicPrefix = topicPrefix;
}
value = SymbolUtil.GetFromFields(open.Properties, SymbolUtil.CONNECTION_PROPERTY_QUEUE_PREFIX);
if (value is string queuePrefix)
{
Info.QueuePrefix = queuePrefix;
}
this.tsc.TrySetResult(true);
Provider.FireConnectionEstablished();
}
}