masstransit

How to detect that all subscribers to an event have responded

断了今生、忘了曾经 提交于 2019-12-12 15:52:15
问题 I am currently investigating Mass Transit. I have written a simple sample based on the Starbucks sample. I have the following saga: Define(() => { Initially( When(ReportRequest) .Then((saga, message) => saga.ProcessReportRequest(message)) .TransitionTo(WaitingForReportToComplete) ); During(WaitingForReportToComplete, When(ReportComplete) .Then((saga, message) => { Console.WriteLine("Report Complete for '{0}'", saga.Name); saga.CompleteReportRequest(message); }) .Complete() ); }); The problem

MassTransit saga with Redis persistence gives Method Accpet does not have an implementation exception

跟風遠走 提交于 2019-12-11 17:34:29
问题 I'm trying to add Redis persistence to my saga which is managing calls to a routing slip (as well as additional messages to other consumers depending on the result of the routing slip) in the hopes that it will solve another timeout issue I keep getting. However, I get an error message which goes in to my saga_error queue in RabbitMQ. The error shown in the message is: Method 'Accept' in type 'GreenPipes.DynamicInternal.Automatonymous.State' from assembly 'AutomatonymousGreenPipes

Can't reach consumer

早过忘川 提交于 2019-12-11 16:56:45
问题 I'm new to learn MassTransit and rabbitMQ. I try to publish message and consume it in another dll. maybe something is wrong but i don't know where is my fault. I check it from http://masstransit-project.com/MassTransit/usage/configuration.html#masstransit-and-aspnet-core but still not working This is my configuration public void ConfigureServices(IServiceCollection services) { services.AddHealthChecks(); services.AddMvc(); services.AddScoped<PersonConsumer>(); services.AddMassTransit(x => { x

MassTransit: How to stop the bus after all messages are consumed by consumer?

左心房为你撑大大i 提交于 2019-12-11 15:54:24
问题 I attempt to stop the bus after all the messages in queue consumed using MassTransit. And I set the concurrent Message limit to 1 as my consumer needs to process one message at a time. I've tried putting the bus.StopAsync() behind bus.StartAsync like below. And the result showed that after one message being consumed, the bus will stop. Bus configuration: IBusControl bus = Bus.Factory.CreateUsingRabbitMq(cfg => { IRabbitMqHost host = cfg.Host(new Uri("rabbitmq://localhost"), hostConfigurator =

Correct way to publish and subscribe to an explicit service bus topic with MassTransit?

隐身守侯 提交于 2019-12-11 15:33:05
问题 In scenarios where you want to share a Azure Service Bus namespace (to save cost etc), it's helpful to be able to explicitly set queue and topic names rather than rely on MassTransit conventions. Whilst this is straightforward with queues, we've run into difficulty with topics. The MassTransit documentation is sparse in this area. It's currently recommending to use a ReceiveEndpoint which appears to forward messages from a topic subscription onto a queue and then subscribe to that queue. We

masstransit deferred respond in sagas

不想你离开。 提交于 2019-12-11 14:08:41
问题 I am investigating using sagas in mass transit to orchestrate activities across several services. The lifetime of the saga is short - less than 2 seconds if all goes well. For my use case, i would like to use the request/respond approach, whereby the client requests a command, the saga handles that command, goes through some state changes as messages are received and eventually responds to the first command that initiated the saga, at which point the client receives the response and can

AppHarbor MassTransit CloudAMQP throws Exception None of the specified endpoints were reachable

▼魔方 西西 提交于 2019-12-11 09:15:21
问题 I am trying to use Masstransit with CloudAMQP LEMUR from my AppHarbor application, but I am receiving the exception: "None of the specified endpoints were reachable" This is how Masstransit is configured: Bus.Initialize(sbc => { sbc.UseRabbitMq(); sbc.UseRabbitMqRouting(); sbc.ReceiveFrom("rabbitmq://********-243c-4e49-87fd-ed809c4839f1_apphb.com:EKhooikZAc9SM5t2YW2uc7RGoeFLD7Nv@bunny.cloudamqp.com/7752f6ce-243c-4e49-87fd-ed809c4839f1_apphb.com"); sbc.Subscribe(subs => subs.Handler

Masstransit: Can it use central msmq server? (Or should I start w/RabbitMQ from the start?)

ⅰ亾dé卋堺 提交于 2019-12-11 08:37:43
问题 I set up the Masstransit sample apps, and all was great. Local operation, msmq, looks good. Now I am starting to put masstransit in my real app. In my real app, I have jobs coming from four servers, and processing happening on two worker systems. It seems that masstransit always wants to push to: msmq://localhost/... But I thought I would set up a single, central, msmq server: msmq:///... It appears (I may be missing something! Please correct me if I am off!) that when using msmq, that I need

MassTransit AzureServiceBus generated queues

江枫思渺然 提交于 2019-12-11 06:37:46
问题 I have a working configuration for a MT setup that is hosted in an Azure Service Fabric solution. I have an API that sends messages and a stateless app that reads them. Inside the stateless app I tell it to consume messages of type TestMessage with the following: container.Register(Classes.FromThisAssembly().BasedOn<IConsumer>()); var busControl = Bus.Factory.CreateUsingAzureServiceBus(cfg => { var h = cfg.Host(new Uri("sb://xxxxx.servicebus.windows.net"), host => { host.OperationTimeout =

Masstransit - Rabbit MQ virtual host

喜夏-厌秋 提交于 2019-12-11 03:36:17
问题 I am using mass transit and connecting to my rabbit broker. string uri1 = @"rabbitmq://myusername:mypassword@myip/myvirtualhost/myqueue"; I keep getting a ConfigurationException was unhandled. An exception was thrown during service bus creation {System.Collections.ListDictionaryInternal.NodeKeyValueCollection} {"Failed to start bus services"} at MassTransit.ServiceContainer.Start() in d:\BuildAgent-03\work\aa063b4295dfc097\src\MassTransit\ServiceContainer.cs:line 83 at MassTransit.ServiceBus