MassTransit

Distributed Application Framework for .NET

Github星跟踪图

MassTransit

MassTransit is a free, open-source distributed application framework for .NET. MassTransit makes it easy to create applications and services that leverage message-based, loosely-coupled asynchronous communication for higher availability, reliability, and scalability.

Mass Transit

MassTransit is Apache 2.0 licensed.

Build Status

Branch, Status
---, :---:
master, master
develop, develop

MassTransit Nuget Packages
---------------------------, Package Name, FullFramework, .NET Standard, ------------, :-----------:, :-----------:, Main, MassTransit, 4.6.1, 2.0, Other, MassTransit.Host, 4.6.1, 2.0, MassTransit.Reactive, 4.6.1, 2.0, MassTransit.SignalR, -, 2.0, MassTransit.TestFramework, 4.6.1, 2.0, Containers, MassTransit.Autofac, 4.6.1, 2.0, MassTransit.Extensions.DependencyInjection, 4.6.1, 2.0, MassTransit.Lamar, 4.6.1, 2.0, MassTransit.Ninject, 4.6.1, 2.0, MassTransit.SimpleInjector, 4.6.1, 2.0, MassTransit.StructureMap, 4.6.1, 2.0, MassTransit.Unity, 4.6.1, 2.0, MassTransit.CastleWindsor, 4.6.1, 2.0, Monitoring, MassTransit.AspNetCore, 4.6.1, 2.0, Persistence, MassTransit.Dapper, 4.6.1, 2.0, MassTransit.DocumentDb, 4.6.1, 2.0, MassTransit.EntityFrameworkCore, 4.6.1, 2.0, MassTransit.EntityFramework, 4.6.1, 2.1, MassTransit.Marten, 4.6.1, 2.0, MassTransit.MongoDb, 4.6.1, 2.0, MassTransit.NHibernate, 4.6.1, 2.0, MassTransit.Redis, 4.6.1, 2.0, Transports, MassTransit.ActiveMQ, 4.6.1, 2.0, MassTransit.AmazonSQS, 4.6.1, 2.0, MassTransit.Azure.ServiceBus.Core, 4.6.1, 2.0, MassTransit.Http, 4.6.1, 2.0, MassTransit.RabbitMQ, 4.6.1, 2.0, MassTransit.WebJobs.EventHubs, -, 2.0, MassTransit.WebJobs.ServiceBus, -, 2.0, ## Getting started with MassTransit

In order to get started with MassTransit, you can have a look at the
documentation, which is located at http://masstransit-project.com/MassTransit.

Simplest possible thing:

install-package MassTransit.RabbitMq

and then:

// Message Definition
class MyMessage
{
	public string Value { get; set; }
}

// Code Snippet for Console Application
async Task Main()
{
	var bus = Bus.Factory.CreateUsingRabbitMq(sbc =>
	{
		var host = sbc.Host("localhost"), h =>
		{
			h.Username("guest");
			h.Password("guest");
		});

		sbc.ReceiveEndpoint(host, "my_queue", endpoint =>
		{
			endpoint.Handler<MyMessage>(async context =>
			{
				await Console.Out.WriteLineAsync($"Received: {context.Message.Value}");
			});
		});
	});

	await bus.StartAsync();

	await bus.Publish(new MyMessage { Value = "Hello, World." });

	Console.ReadLine();

	await bus.StopAsync();
}

You will also need to set up RabbitMQ;

  1. Install Erlang using the installer. (Next -> Next ...)
  2. Install RabbitMQ using the installer. (Next -> Next ...) You now have a RabbitMQ broker (look in services.msc for it) that you can log into using guest, guest. You can see message rates, routings and active consumers using this interface.

Please note

You need to add the management interface before you can login. First, from an elevated command prompt, change directory to the sbin folder within the RabbitMQ Server installation directory e.g. %PROGRAMFILES%\RabbitMQ Server\rabbitmq_server_3.5.3\sbin\

Next, run the following command to enable the rabbitmq management plugin:

rabbitmq-plugins.bat enable rabbitmq_management

Downloads

Download from NuGet 'MassTransit' Search NuGet for MassTransit

Download the continuously integrated Nuget packages from AppVeyor.

Supported transports

We support RabbitMQ and Azure Service Bus message brokers.

Mailing list

MassTransit Discuss

Gitter Chat

While attendance is pretty light, there is a Gitter chat room available:

Join the chat at https://gitter.im/MassTransit/MassTransit

GitHub Issues

Pay attention

Please do not open an issue on github, unless you have spotted an actual bug in MassTransit.
If you are unsure, ask on the mailing list, and if we confirm it's a bug, we'll ask you to create the issue.
Issues are not the place for questions, and they'll likely be closed.

This policy is in place to avoid bugs being drowned out in a pile of sensible suggestions for future
enhancements and calls for help from people who forget to check back if they get it and so on.

Building from Source

  1. Install the latest .NET Core 3.0 preview.
  2. Clone the source down to your machine.
    git clone git://github.com/MassTransit/MassTransit.git
    
  3. Run build.ps1 or build.sh.

Contributing

  1. Turn off autocrlf.
    git config core.autocrlf false
    
  2. Hack!
  3. Make a pull request.

Builds

MassTransit is built on AppVeyor

REQUIREMENTS

  • .Net 4.6.1 or .NET Standard 2.0

CREDITS

Logo Design by The Agile Badger

主要指标

概览
名称与所有者MassTransit/MassTransit
主编程语言C#
编程语言C# (语言数: 4)
平台
许可证Apache License 2.0
所有者活动
创建于2010-07-16 13:21:43
推送于2025-06-10 15:00:34
最后一次提交2025-05-09 08:46:34
发布数139
最新版本名称v8.4.1 (发布于 )
第一版名称v2.0.1 (发布于 )
用户参与
星数7.4k
关注者数242
派生数1.9k
提交数7.2k
已启用问题?
问题数1995
打开的问题数7
拉请求数934
打开的拉请求数1
关闭的拉请求数805
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?