Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage Initialized has no additional middlewares registered #399

Open
priore opened this issue Jul 4, 2019 · 0 comments
Open

Stage Initialized has no additional middlewares registered #399

priore opened this issue Jul 4, 2019 · 0 comments

Comments

@priore
Copy link

priore commented Jul 4, 2019

Hello,
in what case is the error in question generated?
I cannot understand why this error is generated and does not send messages.

            private RawRabbit.Instantiation.Disposable.BusClient client;


            try
            {
               var config = new RawRabbitConfiguration()
                {
                    Username = username,
                    Password = password,
                    VirtualHost = "/",
                    Hostnames = new List<string>() { hostname },
                    AutoCloseConnection = false,
                    //Ssl = new SslOption() {  Enabled = true },
                    Port = port,
                    Exchange = new GeneralExchangeConfiguration
                    {
                        AutoDelete = false,
                        Durable = true,
                        Type = RawRabbit.Configuration.Exchange.ExchangeType.Direct
                    },
                    Queue = new GeneralQueueConfiguration
                    {
                        Exclusive = false,
                        AutoDelete = false,
                        Durable = true
                    }
                };

                var options = new RawRabbitOptions() { ClientConfiguration = config };
                client = RawRabbitFactory.CreateSingleton(options);

                client.SubscribeAsync<MessageModel>(async msg =>
                {
                    return await Task.Run(() => MessageReceived(msg));
                },
                ctx => ctx.UseSubscribeConfiguration(
                    cfg => cfg.FromDeclaredQueue(
                        queue => queue.WithName(queueName))))
                        .GetAwaiter();
            }
            catch (Exception ex)
            {
                OnError?.Invoke(this, ex);
            }

please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant