Exemplo n.º 1
0
        public void Start()
        {
            if (!hasStarted.SetTrueIf(false))
            {
                throw new InvalidOperationException("RestBus Subscriber has already started!");
            }

            Restart();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Starts the host
        /// </summary>
        internal void Start()
        {
            if (!hasStarted.SetTrueIf(false))
            {
                throw new InvalidOperationException("RestBus host has already started!");
            }

            subscriber.Start();

            Task.Factory.StartNew(RunLoop, creationOptions: TaskCreationOptions.LongRunning);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Starts the host
        /// </summary>
        internal void Start()
        {
            if (!hasStarted.SetTrueIf(false))
            {
                throw new InvalidOperationException("KafkaBus host has already started!");
            }

            this.logger.LogInformation($"{nameof(KafkaBusHost<TContext>)} is starting.");
            subscriber.Start();

            Task.Factory.StartNew(RunLoop, creationOptions: TaskCreationOptions.LongRunning);
        }
Exemplo n.º 4
0
        public void Start()
        {
            if (!hasStarted.SetTrueIf(false))
            {
                throw new InvalidOperationException("RestBus host has already started!");
            }
            subscriber.Start();

            System.Threading.Thread msgLooper = new System.Threading.Thread(RunLoop);
            msgLooper.Name         = "RestBus WebApi Host";
            msgLooper.IsBackground = true;
            msgLooper.Start();
        }
Exemplo n.º 5
0
 /// <summary>
 /// Sets a flag that indicates that pool should not be used any longer.
 /// </summary>
 internal void SetRecycle()
 {
     _recycle.SetTrueIf(false);
 }