![masstransit request response masstransit request response](https://s3.studylib.net/store/data/007297636_1-9184c80f08e2c860d60ef7685a627946.png)
Here's a link to Kafka's open source repository on GitHub. Kafka is an open source tool with 13.1K GitHub stars and 6.99K GitHub forks. On the other hand, MassTransit provides the following key features:
#MASSTRANSIT REQUEST RESPONSE SOFTWARE#
NET-based Enterprise Service Bus software that helps Microsoft developers route messages over MSMQ, RabbitMQ, TIBCO and ActiveMQ service busses, with native support for MSMQ and RabbitMQ.
#MASSTRANSIT REQUEST RESPONSE FREE#
MassTransit is free software/open-source. On the other hand, MassTransit is detailed as " Lightweight message bus for creating distributed applications". It provides the functionality of a messaging system, but with a unique design. Kafka is a distributed, partitioned, replicated commit log service.
![masstransit request response masstransit request response](https://i.stack.imgur.com/WuRVk.png)
And this is the documented behaviour - MT will not call you back if there is it can not handle the message.Īs soon as I fixed the command handler to fill in all fields with default values before sending it back to the UI, the system works as expected - I get the response back in the UI and no more timeouts.Kafka vs MassTransit: What are the differences?ĭevelopers describe Kafka as " Distributed, fault tolerant, high throughput pub-sub messaging system".
![masstransit request response masstransit request response](https://i.stack.imgur.com/SJyPt.png)
No exceptions, no other delegate to let you know there was a message deserialization problem, nothing. Now MassTransit does not give you any indication that there was a problem, it just doen't call your delegate that it is supposed to call when a message arrives. When that response arrives at the UI, the Json serializer can not find the unassigned fields - it thinks they are missing - and pukes. A little more digging and I find out that I am not setting all the fields on the response message withing the command handler before sending it back to the UI. Specifically an exception thrown by the NewtonSoft Json serializer - it can't deserialize my message. I go back to my original solution and decide to debug the Nancy UI, turn on exceptions break where thrown. The UI sends a request and the command handler echos it back. The next thing to do was to write a really simple Nancy UI and a really simple command handler service communicating via MassTransit.
![masstransit request response masstransit request response](https://i.ytimg.com/vi/Uw3hc2EUV18/maxresdefault.jpg)
Now I am thinking that I am doing something wrong. I checked out the MassTransit Google Group and discovered that an issue had been reported with Request/Response in ASP.NET - I am hosting my Nancy UI in ASP.NET - so this got me thinking that this was my problem, even though it was reported as fixed in v2.7 of MT. There were no exceptions being thrown or swallowed by the command handler - it was all working, and yet I was not recieving the response back in the UI. The problem was that my UI would time out, but I could also see that nothing went wrong in my command handler since I can see the events being propagated to the event bus. At this point, assuming nothing went wrong in the command handler, the command handler will send a response back to the client. Commands are processed against the domain model (DDD style), the domain model will raise events that are then persisted in an event store, and the events are published on an event bus. I have the UI sending commands in a synchronous fashion using the Request/Response pattern in MassTransit to a command handling service. I have a simple UI, web based using NancyFX. This took me a couple of days to figure out!