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
0
votes
0 answers

Why doesn't my MassTransit Consumer consume a message that exists in AzureServiceBus?

We're using MassTransit to build microservices using Azure ServiceBus. Up until now we've only used topics (as opposed to queues), since (I guess) we had an easier time getting topics up and running. I would like to use queues, but can't seem to get…
0
votes
1 answer

Best setup for ApiGateway-MicroService communication pattern in MassTransit and RabbitMQ

I am implementing ApiGateway-MicroService communication protocol in my app with MassTransit and RabbitMQ. That protocol is meant to replace "traditional" REST API communication between ApiGateway and Microservices (I am talking about simple…
user606521
  • 14,486
  • 30
  • 113
  • 204
0
votes
2 answers

Consumer does not receive message when using Mass Transit with Azure Service Bus Topics

I have just started learning Masstransit and I would like to ask you one query on the accepted answer in this post. Here I have the same problem where consumer does not get the message. May be I have made some mistake or misunderstood some basic…
Molay
  • 39
  • 7
0
votes
2 answers

MassTransit RespondAsync() throws Microsoft.Azure.ServiceBus.MessagingEntityNotFoundException

A Web API with the following Startup configuration: services.AddMassTransit( x => { x.AddBus(provider => this.CreateBus(provider)); string queueName = settings.InputQueueName; var serviceBusUri = new…
Dan Cook
  • 1,935
  • 7
  • 26
  • 50
0
votes
1 answer

Where is masstransit retry method?

Where is it? var sessionFactory = CreateSessionFactory(); var busControl = Bus.Factory.CreateUsingRabbitMq(cfg => { cfg.Host("rabbitmq://localhost/"); cfg.ReceiveEndpoint("submit-order", e => { e.UseMessageRetry(r => …
eocron
  • 6,885
  • 1
  • 21
  • 50
0
votes
1 answer

IMediatr with Autofac in Domain Objects DDD

I have set my Domain Model objects to be independent of any service and infrastructure logic. I am also using Domain Events to react to some changes in Domain Models. Now my problem is how to raise those events from the Domain Model objects…
Luka
  • 4,075
  • 3
  • 35
  • 61
0
votes
1 answer

How to return ICollection of Interfaces in MassTransit response?

So I have something like this. public interface IFoundUserDataResponse { string UserName { get; } string DisplayName { get; } string Email { get; } ICollection Notifications { get; } …
yeljo
  • 51
  • 5
0
votes
1 answer

Consequences of setting QueueExpiration in MassTransit?

If I set QueueExpiration in MassTransit during configuration to 5 hours, does that mean that the queue will be deleted if no activity has happened in the queue for 5 hours, or will it delete itself even if there is activity, after 5 hours? Edit: I…
Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187
0
votes
0 answers

How to use MassTransit InMemory?

I want to register consumer by interface, send message, initialize it by interface from container, then consume: public sealed class TestConsumer : IConsumer where T : class { private readonly Func, Task> _onConsume; …
eocron
  • 6,885
  • 1
  • 21
  • 50
0
votes
1 answer

Masstransit: How to republish or send negative acknowledgement?

I have multiple microservices. They communicate through message broker as currently, I am using Masstransit rabbitmq. Things are working fine. Now, I have a case where one service A publishes a message and another service B consumes it. Service B…
Umer Waheed
  • 4,044
  • 7
  • 41
  • 62
0
votes
1 answer

Is it possible to call synchronous http post request using ASP.net?

I have a scenario where http POST request execute, call another get request and return response of get request. Here is my code public class EmployeeController : ControllerBase { private readonly IBusControl _bus; public…
0
votes
1 answer

MassTransit, consumer does not get activated unless the message is in a common library

I have a publisher library which simple sends a message , and a consumer library which just consumes messages. These two are linked by a common library which contains a message called T. In this configuration everything works just fine. Now If I go…
user9124444
0
votes
1 answer

Masstransit Testharness with multiple ExecuteActivities doesn't create Endpoints as expected

I want to write a test that checks if my routingslip works as expected. I narrowed it down to this simplified Version. namespace MasstransitTest { public class Tests { private readonly InMemoryTestHarness _harness; public…
Domo
  • 560
  • 5
  • 18
0
votes
1 answer

Masstransit Problem adding Payload to request/response in Unit Testing, alternativly using Pipes in Unit Tests

currently I have the problem that I want to write unit tests for Masstransit in .NET. My request/response consumer has some consumer filters, one of these filters are generating extra data as message payload and attaching this to the request…
adaumann
  • 31
  • 5
0
votes
2 answers

Masstransit (non-DI) configuration to autogenerate an Azure Service Bus Topic with Duplicate Detection enabled

I've discovered no Masstransit configuration that allows a service bus Topic to be created with Duplicate Detection enabled. You can do it with Queues simply enough. But for Topics it seems a bit of a mystery. Does anybody have a working…
Rex Henderson
  • 412
  • 2
  • 7