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
1 answer

Testing a state machine saga in MassTransit with a Kafka rider

In MassTransit documentation, I saw an example of testing a state machine saga with a bus, but there was no example of doing it with a Kafka rider. Whether you do it the same way, or should it be done differently?
0
votes
0 answers

Masstransit/RabbitMQ legacy MVC 4.6.2 solution can't publish messages

We've a legacy MVC website C# 4.6.1. In a brand new project MVC 4.6.1 it works just fine. In the legacy solution I try to call busControl.Start(); And it gets stuck there, but it never times out, so I don't have also any error message or any other…
MetalGeorge
  • 321
  • 6
  • 16
0
votes
0 answers

Unpredictable Kafka offset behavior using MassTransit

I have three cases: When the application is shut down, and then a few messages are sent on the topic, after running the application and consuming messages, the Current Offset is not updated. When the application is running, I'm sending few…
0
votes
1 answer

MassTransit IJobConsumer fails to run job

I'm trying to use the new IJobConsumer, but the job is never run. On the project I'm testing this with, Mediator works fine, as well as regular (short-lived) consumers. The only thing that I can't seem to make work is the IJobConsumer. I'm not sure…
giagiu
  • 19
  • 1
0
votes
2 answers

How can i persist MassTransit state data in entity framework?

I have a working state machine using MassTransit, however, I would like to persist the storage of state using EF Core. I followed the guide on MassTransit's website but it won't work, it does generate the table but does not populate it with data…
0
votes
1 answer

Can I access the amount of messages that have been prefetched, from the outside?

In MassTransit, I'd like to make an ASP .NET Core healthcheck that considers my app in "degraded health" state, when the "prefetch buffer" is full, and the amount of consumes per second is low enough. In other words, if there are still messages on…
Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187
0
votes
1 answer

Publish message to EventHub Rider from MassTransit BehaviorContext

The documentation for MassTransit Event Hub Riders recommends using an IEventHubProducerProvider (part of the MassTransit.EventHub nuget package) to send messages to an EventHub. However, most MassTransit documentation suggests that when publishing…
user483679
  • 665
  • 1
  • 7
  • 21
0
votes
1 answer

How to connect consumer to Kafka topic with MassTransit using state machine

When there are two services: Service 1 hosts state machine and produces message on topic. Service 2 should consume this message. How to setup this properly for Service 2 to consume messages? When the code goes like this, it doesn't…
0
votes
1 answer

How to set PrefetchCount when using ConnectReceiveEndpoint with MassTransit?

As default, MassTransit sets the PrefetchCount to 16. I would like to change that. I can do this when configuring MassTransit. But when using ConnectReceiveEndpoint I cannot set the PrefetchCount. If I set the PrefetchCount doing configuration, then…
Michael
  • 3,350
  • 2
  • 21
  • 35
0
votes
1 answer

Publish vs Produce in MassTransit with Kafka

I want to implement state machine integrated with Kafka topics. Whenever some message will be produced to a topic, I want state machine to react by changing a state. I have two questions: Is producing a message on a topic identical with publishing…
0
votes
1 answer

Exception for non-existent topic in MassTransit

When topic in Kafka doesn't exist and there is an endpoint configuration done for it with TopicEndpoint method, it throws an exception: Confluent.Kafka.ConsumeException: Broker: Unknown topic or partition. After the topic is created, the exception…
0
votes
1 answer

MassTransit serialize non-Masstransit message

I have been using Masstransit for my project as a consumer. The MassTransit service will consume messages from another service, the other one I have build currently running on NestJS and using RabbitMq to send the messages. The problem when I try to…
Nguyen An
  • 3
  • 1
  • 5
0
votes
1 answer

Exception handling using Kafka rider in MassTransit

In MassTransit while using transport like RabbitMQ when an exception is thrown, the message goes into queue queue_name_error. But using Kafka, there is no topic with _error suffix, nor similar queue on supporting transport. How to handle exceptions…
0
votes
1 answer

Cannot add EF Core migrations in project that registers multiple DbContext

I have a console app that has two DbContexts. One is configured using MassTransit and the other is a reference to another project for which I already run migrations for. So, I want to run migrations on this service for the MassTransit configured…
Albert
  • 33
  • 6
0
votes
1 answer

How to use MassTransit test harness to test sagas with Activities (Automatonymous.Binders.EventActivityBinder) with constructor dependency injection?

To keep saga code simple I created activities that are executed when a saga event is triggered. Now I'd like to create tests for the saga using MT's test harness. I also need to mock dependencies from these activities. How can this be done in MT…
EduardoCMB
  • 392
  • 2
  • 17
1 2 3
99
100