public void parse_durable_uri_with_only_queue() { var endpoint = new AzureServiceBusEndpoint(); endpoint.Parse(new Uri("asb://queue/q1/durable")); endpoint.Mode.ShouldBe(EndpointMode.Durable); endpoint.QueueName.ShouldBe("q1"); }
public AzureServiceBusSender(AzureServiceBusEndpoint endpoint, ITransportLogger logger, CancellationToken cancellation) { _protocol = endpoint.Protocol; _endpoint = endpoint; _logger = logger; _cancellation = cancellation; Destination = endpoint.Uri.ToUri(); }
public override Uri BuildUriForTopic(string topicName) { var endpoint = new AzureServiceBusEndpoint { Mode = Mode, TopicName = topicName }; return(endpoint.Uri); }
public void parse_durable_uri() { var endpoint = new AzureServiceBusEndpoint(); endpoint.Parse(new Uri("asb://subscription/sub1/topic/key1/durable")); endpoint.Mode.ShouldBe(EndpointMode.Durable); endpoint.SubscriptionName.ShouldBe("sub1"); endpoint.TopicName.ShouldBe("key1"); }
public AzureServiceBusListener(AzureServiceBusEndpoint endpoint, AzureServiceBusTransport transport, ITransportLogger logger, CancellationToken cancellation) { _endpoint = endpoint; _transport = transport; _logger = logger; _cancellation = cancellation; _protocol = endpoint.Protocol; Address = endpoint.Uri; }
public AzureServiceBusListeningAgent(AzureServiceBusEndpoint endpoint, HandlerGraph handlers, ITransportLogger logger, CancellationToken cancellation) { _endpoint = endpoint; _handlers = handlers; _logger = logger; _cancellation = cancellation; _protocol = endpoint.Protocol; Address = endpoint.Uri.ToUri(); }
public AzureServiceBusSender(AzureServiceBusEndpoint endpoint, AzureServiceBusTransport transport) { _protocol = endpoint.Protocol; _endpoint = endpoint; _transport = transport; // The variance here should be in constructing the sending & buffer blocks if (_endpoint.TopicName.IsEmpty()) { _sender = _transport.TokenProvider != null ? new MessageSender(_transport.ConnectionString, _endpoint.QueueName, _transport.TokenProvider, _transport.TransportType, _transport.RetryPolicy) : new MessageSender(_transport.ConnectionString, _endpoint.QueueName, _transport.RetryPolicy); } else { _sender = _transport.TokenProvider != null ? new TopicClient(_transport.ConnectionString, _endpoint.TopicName, _transport.TokenProvider, _transport.TransportType, _transport.RetryPolicy) : new TopicClient(_transport.ConnectionString, _endpoint.TopicName, _transport.RetryPolicy); } }
public void default_protocol_is_the_default_protocol() { var endpoint = new AzureServiceBusEndpoint(); endpoint.Protocol.ShouldBeOfType <DefaultAzureServiceBusProtocol>(); }