masstransit

基于Abp VNext框架设计

北战南征 提交于 2020-04-24 17:55:19
abp 通过 IDistributedEventBus 接口集成自 IEventBus 实现分布式事件消息的发布订阅。 IEventBus 在什么时机触发 PublishAsync ? 当前UnitOfWork完成时,触发 IEventBus 的 PublishAsync 在没有事务环境下,同步调用 IEventBus 的 PublishAsync abp 默认实现基于RabbitMq消息队列 Volo.Abp.EventBus.RabbitMQ 实现分布式消息的发布与订阅。 消息治理核心问题: 生产端如何保证投递成功的消息不能丢失。 Mq自身如何保证消息不丢失。 消费段如何保证消费端的消息不丢失。 基于abp 默认实现的DistributedEventBus不能满足以下场景: Publisher 生产者无法保证消息一定能投递到MQ。 Consumer 消费端在消息消费时,出现异常时,没有异常错误处理机制(确保消费失败的消息能重新被消费)。 我们引入 Masstransit ,来提升abp对消息治理能力。 Masstransit提供以下开箱即用功能: Publish/Send/Request-Response等几种消息投递机制。 多种IOC容器支持。 异常机制。 Saga事务管理。 事务活动补偿机制(Courier) 消息审计 消息管道处理机制 Abp 框架下事件消息集成

Is it possible to use MassTransit 3 with Azure Service Bus without Manage permission policy?

不想你离开。 提交于 2020-03-21 20:03:52
问题 I spent some days testing MassTransit 3.1.2 to see if we can use it with Azure Service Bus in our applications. I made a sample with two console applications using MassTransit.AzureServiceBus (3.1.2) : one publisher and one suscriber. It works well. When I start the applications, the entities (queues, topic, subscriptions) are created automatically on my namespace on Azure. That's nice when you are testing thing but in production, I don't want the application to be allowed to create entities.

Is it possible to use MassTransit 3 with Azure Service Bus without Manage permission policy?

倖福魔咒の 提交于 2020-03-21 20:03:18
问题 I spent some days testing MassTransit 3.1.2 to see if we can use it with Azure Service Bus in our applications. I made a sample with two console applications using MassTransit.AzureServiceBus (3.1.2) : one publisher and one suscriber. It works well. When I start the applications, the entities (queues, topic, subscriptions) are created automatically on my namespace on Azure. That's nice when you are testing thing but in production, I don't want the application to be allowed to create entities.

Send async Task<IActionResult> from receiver to Sender in MASSTRANNSIT

人走茶凉 提交于 2020-03-04 15:57:27
问题 I am stuck at one point in Azure ServiceBus Queue implementation using MASSTRANSIT. Below is my scenario and code. My Sender is in EventController.cs and its code is as follow's. [ProducesResponseType(202)] [ProducesResponseType(400)] [ProducesResponseType(401)] [ProducesResponseType(404)] [HttpPut("{applicationNumber}/{systemId}/DipDecisionUpdated/{decisionId}")] public async Task<IActionResult> DipDecisionUpdated([Required]string applicationNumber, [Required]SystemEnum systemId, [Required

MassTransit Interoperability with non-.NET services

一个人想着一个人 提交于 2020-01-24 03:03:06
问题 I have been using MassTransit and really like it. However, by default, it wraps all RabbitMQ payloads/messages with some JSON specific to MassTransit. This makes it difficult to exchange messages with non-.NET services. I know that JSON can be parsed by any language, but MassTransit is a .NET-only thing, and in my non-.NET services, I'd like to avoid having to add special logic to handle messages generated by MassTransit. Is it possible to serialize JSON messages using MassTransit that don't

Publish message using exchange and routing key using MassTransit

雨燕双飞 提交于 2020-01-14 12:46:26
问题 I've been looking at MassTransit for a couple of weeks now and I'm curious about the possibilities. However, I don't seem to be able to get the concepts quite right. Expected behaviour I wanted to publish message to "direct" exchange with routing key which is bind to two different queue for performing other activities. When I attempted the same logic using MassTransit for better scalability. I've found MassTransit creates own exchange based on queue name with fanout type. Classic code to

Publish message using exchange and routing key using MassTransit

喜夏-厌秋 提交于 2020-01-14 12:46:08
问题 I've been looking at MassTransit for a couple of weeks now and I'm curious about the possibilities. However, I don't seem to be able to get the concepts quite right. Expected behaviour I wanted to publish message to "direct" exchange with routing key which is bind to two different queue for performing other activities. When I attempted the same logic using MassTransit for better scalability. I've found MassTransit creates own exchange based on queue name with fanout type. Classic code to

Publish message using exchange and routing key using MassTransit

↘锁芯ラ 提交于 2020-01-14 12:46:05
问题 I've been looking at MassTransit for a couple of weeks now and I'm curious about the possibilities. However, I don't seem to be able to get the concepts quite right. Expected behaviour I wanted to publish message to "direct" exchange with routing key which is bind to two different queue for performing other activities. When I attempted the same logic using MassTransit for better scalability. I've found MassTransit creates own exchange based on queue name with fanout type. Classic code to

Masstransit one fault consumer for all fault message

不羁岁月 提交于 2020-01-13 05:26:07
问题 How to have one generic consumer that handle all Fault Messages ? Do I need to register Fault Consumer for each of my fault messages? 回答1: Why not consume Fault ? public class WantAllFaultsGimmeThem : IConsumer<Fault> { public async Task Consume(ConsumeContext<Fault> context) { // whatever you want to do here } } The only issue is that the Message is not part of this interface and therefore it will not be even deserialised. so you will not have access to the message, only to the message id.

how can I purge a MassTransit queue?

一笑奈何 提交于 2020-01-03 17:34:44
问题 I'd like to delete all the messages from a queue in my integration test SetUp routine, how can I accomplish that? No luck with googling/intellisense-bruteforce. If it matters -- I'm using RabbitMq as transport. 回答1: There's no way to "delete" from queues within MassTransit. For tests you can use temporary, random queue URIs via rabbitmq://localhost/*?temporary=true . Or you can just append ?temporary=true to the end of your existing queue URIs to have MT clean stuff up afterward. Note: