Ejemplo n.º 1
0
		public void InstantiateAndStartConsumer(
			BusConfiguration busConfiguration)
		{
			this.c_connection = new ConnectionFactory { Uri = busConfiguration.ConnectionUris.First() }.CreateConnection();
			this.c_cancellationTokenSource = new CancellationTokenSource();

			this.c_consumer = new PMCG.Messaging.Client.Consumer(
				this.c_connection,
				busConfiguration,
				this.c_cancellationTokenSource.Token);
			this.c_consumer.Start();
		}
Ejemplo n.º 2
0
        public void InstantiateAndStartConsumer(
            BusConfiguration busConfiguration)
        {
            this.c_connection = new ConnectionFactory {
                Uri = busConfiguration.ConnectionUris.First()
            }.CreateConnection();
            this.c_cancellationTokenSource = new CancellationTokenSource();

            this.c_consumer = new PMCG.Messaging.Client.Consumer(
                this.c_connection,
                busConfiguration,
                this.c_cancellationTokenSource.Token);
            this.c_consumer.Start();
        }
Ejemplo n.º 3
0
		public void InstantiateConsumerTasks()
		{
			var _connectionUri = Configuration.LocalConnectionUri;
			this.c_connection = new ConnectionFactory { Uri = _connectionUri }.CreateConnection();

			var _busConfigurationBuilder = new BusConfigurationBuilder();
			_busConfigurationBuilder.ConnectionUris.Add(_connectionUri);

			this.c_cancellationTokenSource = new CancellationTokenSource();

			this.c_consumerTasks = new Task[this.c_numberOfConsumers];
			for(var _index = 0; _index < this.c_numberOfConsumers; _index++)
			{
				var _consumer = new PMCG.Messaging.Client.Consumer(this.c_connection, _busConfigurationBuilder.Build(), this.c_cancellationTokenSource.Token);
				this.c_consumerTasks[_index] = _consumer.Start();
			}
		}
Ejemplo n.º 4
0
        public void InstantiateConsumerTasks()
        {
            var _connectionUri = Configuration.LocalConnectionUri;

            this.c_connection = new ConnectionFactory {
                Uri = _connectionUri
            }.CreateConnection();

            var _busConfigurationBuilder = new BusConfigurationBuilder();

            _busConfigurationBuilder.ConnectionUris.Add(_connectionUri);

            this.c_cancellationTokenSource = new CancellationTokenSource();

            this.c_consumerTasks = new Task[this.c_numberOfConsumers];
            for (var _index = 0; _index < this.c_numberOfConsumers; _index++)
            {
                var _consumer = new PMCG.Messaging.Client.Consumer(this.c_connection, _busConfigurationBuilder.Build(), this.c_cancellationTokenSource.Token);
                this.c_consumerTasks[_index] = _consumer.Start();
            }
        }