easynetq

SignalR hub resolves to null inside RabbitMQ subscription handler in ASP.NET Core

青春壹個敷衍的年華 提交于 2019-12-10 23:37:43
问题 I have an ASP.NET Core MVC project with RabbitMQ (by means of EasyNetQ) and SignalR. Next, I have a subscription on a RabbitMQ message that should send a notification to the client via SignalR. But sadly, the hub always resolves to null . An interesting observation is that when the application is still starting and there are still unacknowledged messages in the queue, the service actually resolves just fine. public void ConfigureServices(IServiceCollection services) { services.AddSignalR();

How to declare custom error exchange for each consumer in EasyNetQ?

左心房为你撑大大i 提交于 2019-12-10 14:08:07
问题 I have four consumer when error occured message publishing to default EasyNetQ_Default_Error_Queue is it possible to each queue consumer write own error exchange For example; Queue Name : A ErrorExchange :A_ErrorExchange Queue Name : B ErrorExchange :B_ErrorExchange bus.Advanced.Conventions.ErrorExchangeNamingConvention = new ErrorExchangeNameConvention(info => "A_DeadLetter"); bus.Advanced.Conventions.ErrorExchangeNamingConvention = new ErrorExchangeNameConvention(info2 => "B_DeadLetter");

RabbitMQ, EasyNetQ With NodeJS (amqplib) - Subscribing

和自甴很熟 提交于 2019-12-08 12:15:37
问题 I'd already asked this question regarding publishing from amqplib --> EasyNetQ, and got it working with help from the author of EasyNetQ. Now, I'm having trouble going the other way. It did briefly "work", but then i went back and cleaned-out all the queues I'd created and now - it won't work (publishing from amqplib to ENQ still works, but ENQ to amqplib doesn't). If I have this code: Bus.SubscribeAsync<BusManifestHolla>(HollaSubID_1, msg => Task.Factory.StartNew(() => { Console.WriteLine(

EasyNetQ - How to retry failed messages & persist RetryCount in message body/header?

左心房为你撑大大i 提交于 2019-12-08 04:57:07
问题 I am using EasyNetQ and need to retry failed messages on the original queue. The problem is: even though I successfully increment the TriedCount variable (in the body of every msg), when EasyNetQ publishes the message to the default error queue after an exception, the updated TriedCount is not in the msg! Presumably because it just dumps the original message to the error queue without the consumer's changes. The updated TriedCount works for in-process republishes, but not when republished

Re-queue message on exception

隐身守侯 提交于 2019-12-03 01:48:06
I'm looking for a solid way of re-queuing messages that couldn't be handled properly - at this time. I've been looking at http://dotnetcodr.com/2014/06/16/rabbitmq-in-net-c-basic-error-handling-in-receiver/ and it seems that it's supported to requeue messages in the RabbitMQ API. else //reject the message but push back to queue for later re-try { Console.WriteLine("Rejecting message and putting it back to the queue: {0}", message); model.BasicReject(deliveryArguments.DeliveryTag, true); } However I'm using EasyNetQ. So wondering how I would do something similar here. bus.Subscribe<MyMessage>(

EasyNetQ fails to publish to RabbitMQ - PersistentChannel timed out

笑着哭i 提交于 2019-12-01 15:24:57
I am trying to connect to RabbitMQ with EasyNetQ. RabbitMQ is on remote VM. _rabbitBus = RabbitHutch.CreateBus( string.Format("host={0};virtualhost={1}", _hostSettings.Host, _hostSettings.VHost), x => x.Register<IEasyNetQLogger>(l => _logger)); _rabbitBus.Subscribe<Message>(_topic, ReceiveMessage, m => m.WithTopic(_topic)); I get a TimeoutException The operation requested on PersistentChannel timed out. . Remote VM is replying to pings, ports 5672 and 15672 are opened (checked with nmap). RabbitMQ management can be accessed from my host. Also, if RabbitMQ is run on my local machine, it works

EasyNetQ fails to publish to RabbitMQ - PersistentChannel timed out

折月煮酒 提交于 2019-12-01 14:18:26
问题 I am trying to connect to RabbitMQ with EasyNetQ. RabbitMQ is on remote VM. _rabbitBus = RabbitHutch.CreateBus( string.Format("host={0};virtualhost={1}", _hostSettings.Host, _hostSettings.VHost), x => x.Register<IEasyNetQLogger>(l => _logger)); _rabbitBus.Subscribe<Message>(_topic, ReceiveMessage, m => m.WithTopic(_topic)); I get a TimeoutException The operation requested on PersistentChannel timed out. . Remote VM is replying to pings, ports 5672 and 15672 are opened (checked with nmap).

EasyNetQ with asp.net web api as subscriber

荒凉一梦 提交于 2019-11-29 14:47:35
I have to implement a asp.net web api which acts as a subscriber to rabbitMQ. The windows service is going to publish message to the web api services. There will be more than one instance of web api running on production enviornment. I am not sure how to open up the subscriber channel on web api and keep it open untill the IIS restarts. There will be one publisher and several consumer. Can anyone please guide with some sample code to start with? Any help will hugely appreciated Generally RabbitMQ subscriptions don't work well with IIS hosted applications because you have no control over when

EasyNetQ with asp.net web api as subscriber

十年热恋 提交于 2019-11-28 08:37:16
问题 I have to implement a asp.net web api which acts as a subscriber to rabbitMQ. The windows service is going to publish message to the web api services. There will be more than one instance of web api running on production enviornment. I am not sure how to open up the subscriber channel on web api and keep it open untill the IIS restarts. There will be one publisher and several consumer. Can anyone please guide with some sample code to start with? Any help will hugely appreciated 回答1: Generally