Skip to content

GabrieleTronchin/MassTransitPlayground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MassTransit Playground

This repository serves as a playground for testing various features of MassTransit, an open-source framework for message-based distributed applications.

Explore MassTransit here.

Source Code Explanation

This project consists of two main services:

  1. MassTransit.Playground.Sender.Api: Exposes various methods to send messages to a bus using MassTransit.
  2. MassTransit.Playground.Receiver.Api: Does not expose any APIs; it simply consumes messages from a service bus.

image

The project demonstrates switching between Azure Service Bus and RabbitMQ using MassTransit. To switch the service bus provider, modify the ServiceBusOptions property in the appsettings.json file:

"ServiceBusOptions": {
  "Type": "AzureBus",
  "ConnectionString": ""
}

A Docker Compose file is available in the docker folder to set up RabbitMQ.

Topics Covered

This project covers several key topics related to MassTransit:

  • Publishing a message
  • Publishing a message with a delay
  • Publishing a batch of messages
  • Receiving a message
  • Receiving the same message on different subscribers
  • Receiving messages in batches
  • Using observers to intercept published and subscribed events
  • Implementing simple retry strategies for message errors

About

A playground repository for MassTransit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages