private void CreateBus(string azureNamespace, string queueName, string azureServiceBusKey) { var queueUri = "azure-sb://" + azureNamespace + "/" + queueName; _busConfigurator.ReceiveFrom(queueUri); SetupAzureServiceBus(azureNamespace, azureServiceBusKey); }
public void Config(IComponentContext container, ServiceBusConfigurator busConfig) { busConfig.UseMsmq(); busConfig.UseMulticastSubscriptionClient(); busConfig.VerifyMsmqConfiguration(); busConfig.VerifyMsDtcConfiguration(); busConfig.ReceiveFrom(receiveFromEndPoint); }
/// <summary> /// c'tor /// </summary> /// <param name="uri">The uri to receive from during the scenario.</param> protected BusScenarioBuilder(Uri uri) { _settings = new ServiceBusDefaultSettings(); _settings.ConcurrentConsumerLimit = 1; _settings.ReceiveTimeout = 50.Milliseconds(); _configurator = new ServiceBusConfigurator(_settings); _configurator.ReceiveFrom(uri); }
protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom("loopback://localhost/mt_server"); configurator.AddSubscriptionObserver((bus, coordinator) => { _remoteLoopback = new SubscriptionLoopback(bus, coordinator); return(_remoteLoopback); }); }
protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom(RemoteEndpointUri); configurator.AddSubscriptionObserver((bus, coordinator) => { _remoteLoopback = new SubscriptionLoopback(bus, coordinator); return(_remoteLoopback); }); }
protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator) { LocalUri = new Uri("loopback://localhost/mt_client"); configurator.ReceiveFrom(LocalUri); configurator.AddSubscriptionObserver((bus, coordinator) => { _localLoopback = new SubscriptionLoopback(bus, coordinator); return(_localLoopback); }); }
public LoopbackLocalRemoteBusScenarioBuilder() { _settings = new ServiceBusDefaultSettings(); _settings.ConcurrentConsumerLimit = 4; _settings.ReceiveTimeout = 50.Milliseconds(); _localConfigurator = new ServiceBusConfigurator(_settings); _localConfigurator.ReceiveFrom(DefaultLocalUri); _remoteConfigurator = new ServiceBusConfigurator(_settings); _remoteConfigurator.ReceiveFrom(DefaultRemoteUri); }
protected virtual void ConfigureFaultBus(ServiceBusConfigurator configurator) { configurator.SetConcurrentConsumerLimit(1); configurator.ReceiveFrom(FaultEndpointUri); configurator.AddSubscriptionObserver((bus, coordinator) => { _localFaultLoopback = new SubscriptionLoopback(bus, coordinator); return(_localFaultLoopback); }); configurator.AddSubscriptionObserver((bus, coordinator) => { _remoteFaultLoopback = new SubscriptionLoopback(bus, coordinator); return(_remoteFaultLoopback); }); }
private void ConfigureMassTransit(ServiceBusConfigurator config) { config.UseRabbitMq(); var queueConnection = _rabbitMqConnection + "/" + _queue; config.ReceiveFrom(queueConnection); if (_queue == Queue.Worker) { foreach (var massTransitConsumer in _massTransitConsumers) { var consumerType = massTransitConsumer; config.Subscribe(s => s.Consumer(consumerType, t => _kernel.Get(t))); } } }
void ITransportConfigurator.Configure(ServiceBusConfigurator configurator, string queueName, int? consumerLimit) { Uri receiveFrom = _settings.GetQueueAddress(queueName, consumerLimit); configurator.UseRabbitMq(x => { x.ConfigureHost(receiveFrom, h => { h.SetUsername(_settings.Username); h.SetPassword(_settings.Password); h.SetRequestedHeartbeat(_settings.Heartbeat); }); }); configurator.ReceiveFrom(receiveFrom); if (consumerLimit.HasValue) configurator.SetConcurrentConsumerLimit(consumerLimit.Value); }
void ITransportConfigurator.Configure(ServiceBusConfigurator configurator, string queueName, int?consumerLimit) { Uri receiveFrom = _settings.GetQueueAddress(queueName, consumerLimit); configurator.UseRabbitMq(x => { x.ConfigureHost(receiveFrom, h => { h.SetUsername(_settings.Username); h.SetPassword(_settings.Password); h.SetRequestedHeartbeat(_settings.Heartbeat); }); }); configurator.ReceiveFrom(receiveFrom); if (consumerLimit.HasValue) { configurator.SetConcurrentConsumerLimit(consumerLimit.Value); } }
protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom(LocalUri); }
/// <summary> /// Specify the endpoint from which messages should be read /// </summary> /// <param name="configurator"></param> /// <param name="uriString">The uri of the endpoint</param> public static void ReceiveFrom(this ServiceBusConfigurator configurator, string uriString) { configurator.ReceiveFrom(uriString.ToUri("The receive endpoint URI is invalid")); }
protected virtual void ConfigureRemoteBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom(RemoteEndpointUri); configurator.UseMsmq(x => x.UseMulticastSubscriptionClient()); }
protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom(_localUri); }
protected virtual void ConfigureLocalBus(ServiceBusConfigurator configurator) { configurator.ReceiveFrom(LocalEndpointUri); configurator.UseMulticastSubscriptionClient(); }
public void Config(IComponentContext container, ServiceBusConfigurator busConfig) { busConfig.UseRabbitMq(); busConfig.ReceiveFrom(receiveFromEndPoint); }