Questions tagged [masstransit]

MassTransit is a free, open source, lightweight service bus for the Microsoft .NET framework.

MassTransit is a free, open source, lightweight service bus for the Microsoft .NET framework.

It supports a number of different transports:

  • RabbitMQ
  • Azure Service Bus
  • Amazon MQ / Active MQ
  • Amazon SQS/SNS

Several saga storage engines, including:

  • SQL (Entity Framework or NHibernate)
  • MongoDB
  • Redis
  • Postgres (via Marten)
  • Cosmos DB

MassTransit also supports Quartz.NET and Hangfire for message scheduling.

MassTransit is hosted on GitHub, has online Documentation and a Discord Server for community support.

1993 questions
7
votes
2 answers

How to test a command- and event based system with Masstransit

I have a command handler that invokes an operation on a domain object which in turn fires an event when the operation has been executed. I'd like to test that an event handler receives the event when the corresponding command has been sent (see…
Christian
  • 7,433
  • 4
  • 36
  • 61
7
votes
1 answer

XUnit unit tests for MassTransit consumer

I am using MassTransit 5.5.5 version and xunit 2.4.1 My consumer looks like this public class StorageInformationConsumer : IConsumer { private readonly IBus _serviceBus; private readonly…
user1532976
  • 469
  • 2
  • 8
  • 15
7
votes
1 answer

ASP.NET Core service not creating RabbitMQ queue

Being a new user of MassTransit and RabbitMQ I'm currently trying to make my ASP.NET core service to work with MassTransit. Taking this documentation section to configure MassTransit and ASP.NET Core I'm unable to get it working. Currently (part…
Andrew
  • 5,395
  • 1
  • 27
  • 47
7
votes
1 answer

MassTransit. Consume equal objects defined in different namespaces

First of all, excuse my English, it's very bad. I am using MassTransit with Azure Service Bus for asynchronous communication between microservices. By their own definition, and to avoid generating dependencies between them, messages sent between…
7
votes
1 answer

RabbitMQ - access to vhost 'XXX' refused for user 'guest'

I am using RabbitMQ 3.0.3 version. The service was working fine for last 4-5 years. Recently some updates patches were installed on the server and the Service stopped responding. This is what is happening: The RabbitMQ service (windows service) is…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
7
votes
3 answers

How to stop a MassTransit bus in an ASP.NET Core server?

I am studying MassTransit and ASP.NET Core, dependancy injection and successfully implemented something that works. I plan to use the Kestrel web server. So I had to configure my ASP.NET core project this way in the Startup.cs. public void…
Larry
  • 17,605
  • 9
  • 77
  • 106
7
votes
1 answer

MassTransit message consumers never see subclass type

This question deals with events (base class events and subclass events) and event handlers. I'm working on existing code, that doesn't seem to work the way the author expected it. I have difficulty understanding why it doesn't work though, so I want…
7
votes
2 answers

Why do we need service bus frameworks like NService Bus/MassTransit on top of message queuing systems like MSMQ/RabbitMQ etc?

In the distributed message transaction world, am trying to understand the different parts that are involved in developing distributed systems. From what I understand you can design messaging system using enterprise bus backed with a message queue…
Chrysalis
  • 4,130
  • 2
  • 21
  • 23
7
votes
1 answer

How can we speed up receiving messages from MSMQ?

My application's bottleneck has become sending and receiving messages over MSMQ with MassTransit. The send and receive are both happening within the same application, but there are often too many messages to use an in-memory queue. Here is my…
Chris
  • 4,663
  • 5
  • 24
  • 33
7
votes
1 answer

How to suspend Mass Transit processing messages from the queue

I have a Mass Transit Service Bus that is listening to several queues and processing the messages. I would like to somehow pause the processing of new requests and wait for the current requests to complete so that I can run some housekeeping…
Mark Robinson
  • 13,128
  • 13
  • 63
  • 81
7
votes
1 answer

MassTransit: specify uri with virtualhost

I am using MassTransit with RabbitMQ and I would like to take advantage of RabbitMQ virtual hosts. Other apps in my organization (not using MassTransit) have a convention of setting up virtual hosts for environments i.e. "myapp" and "myappUAT". I…
Damian
  • 2,709
  • 2
  • 29
  • 40
7
votes
1 answer

How do you configure multiple message consumers in MassTransit?

I'm looking at using MassTransit to publish a event from one process to all other processes that care about that event. In my environment, several processes that are subscribed to that event could be running on the same box. Based on the…
Andrew Theken
  • 3,392
  • 1
  • 31
  • 54
7
votes
3 answers

Competing Consumers in Mass Transit with RabbitMQ

I've implemented a simple publisher/consumer set with MassTransit, and I want to have the consumers read the messages from the same queue. However, when I run it, I see a large portion of the messages sent to the error queue instead of being…
JoshRivers
  • 9,920
  • 8
  • 39
  • 39
6
votes
2 answers

PubSub example in MassTransit

After reading through the pub/sub project sample in MassTransit, it left me scratching my head. In the sample, the client application publishes a request for the subscriber application to update the password of a fictitious user. This sample code…
David Montgomery
  • 1,618
  • 15
  • 28
6
votes
1 answer

Service Bus - Am I being dumb?

I've been looking at Mass Transit for a couple of months now, and I'm really intrigued by the possibilities. However, I don't seem to be able to get the concepts quite right. I've looked the code, and I've gone through the documentation, but I just…
tbddeveloper
  • 2,407
  • 1
  • 23
  • 39