masstransit

How to configure the RequiresDuplicateDetection for AzureServiceBus topics

回眸只為那壹抹淺笑 提交于 2021-02-11 07:41:40
问题 I am trying to configure the RequiresDuplicateDetection property on the ASB topics to true, but it doesn't appear that the setting on the main IServiceBusFactoryConfigurator is respected: var busControl = Bus.Factory.CreateUsingAzureServiceBus(cfg => { cfg.Host("ASB_ConnectionString"); cfg.SubscriptionEndpoint<ExtractionRequest>("Test", e => { e.LockDuration = TimeSpan.FromMinutes(1); e.MaxAutoRenewDuration = TimeSpan.FromMinutes(5); e.AutoDeleteOnIdle = TimeSpan.FromHours(1); }); cfg

How to configure the RequiresDuplicateDetection for AzureServiceBus topics

ⅰ亾dé卋堺 提交于 2021-02-11 07:41:08
问题 I am trying to configure the RequiresDuplicateDetection property on the ASB topics to true, but it doesn't appear that the setting on the main IServiceBusFactoryConfigurator is respected: var busControl = Bus.Factory.CreateUsingAzureServiceBus(cfg => { cfg.Host("ASB_ConnectionString"); cfg.SubscriptionEndpoint<ExtractionRequest>("Test", e => { e.LockDuration = TimeSpan.FromMinutes(1); e.MaxAutoRenewDuration = TimeSpan.FromMinutes(5); e.AutoDeleteOnIdle = TimeSpan.FromHours(1); }); cfg

Why does my MassTransit Fault Consumer not get called?

时光总嘲笑我的痴心妄想 提交于 2021-02-10 14:39:42
问题 I am using MassTransit 7.1.4.0 together with RabbitMQ 3.8.7. I have a consumer which simply throws an exception, and I have a fault consumer which Console.WriteLine the fact that a fault occurred. The fault consumer is not called. I also tried using a fault consumer definition. Also that does not work. Below is the entire program. using System; using System.Threading.Tasks; using GreenPipes; using MassTransit; using MassTransit.ConsumeConfigurators; using MassTransit.Definition; using

Why does my MassTransit Fault Consumer not get called?

孤街醉人 提交于 2021-02-10 14:38:01
问题 I am using MassTransit 7.1.4.0 together with RabbitMQ 3.8.7. I have a consumer which simply throws an exception, and I have a fault consumer which Console.WriteLine the fact that a fault occurred. The fault consumer is not called. I also tried using a fault consumer definition. Also that does not work. Below is the entire program. using System; using System.Threading.Tasks; using GreenPipes; using MassTransit; using MassTransit.ConsumeConfigurators; using MassTransit.Definition; using

MassTransit: how to send a message to specific consumers?

柔情痞子 提交于 2021-02-10 14:14:43
问题 Sorry if my question is dumb, I'm new to MassTransit. My system consists of a server and multiple client devices. I'd like to send a message from the server to a specific client or to a group of clients. As far as I understand, IBusControl.Publish sends the message to all subscribers, and IBusControl.Send to the only one subscriber. How can I achieve this using MassTransit? My transports are RabbitMQ / Azure Service Bus. Thanks! 回答1: MassTransit implements standard messaging patterns, which

How to use MassTransit test harness to test Consumer with constructor dependency injection?

陌路散爱 提交于 2021-02-08 15:14:23
问题 I have some message consumers that take dependencies through the constructor, and I would like to cover them in unit tests. Does MassTransit's test harness provide a way to register consumers with constructor parameters? 回答1: You can specify a factory method, or a consumer factory, when creating a consumer test harness. harness.Consumer<T>(() => new T()); You can find the three standard extension methods in the code: https://github.com/MassTransit/MassTransit/blob/develop/src/MassTransit

Does MassTransit support MSMQ over HTTP transport?

好久不见. 提交于 2021-02-07 23:52:13
问题 HTTP transfer has been available since MSMQ 3.0, however I'm afraid MassTransit doesn't offer the feature to use HTTP protocol as transport protocol between queues. There's a very similar question about this here, which has not been completely answered. Does anyone know if it's possible for a client to subscribe to a bus and send/receive messages through HTTP? Here's the architecture I'm willing to implement: I'll have 2 computers in the local network Computer A runs a server application and

How to override MassTransit default exchange and queue topology convention?

佐手、 提交于 2021-02-07 20:54:52
问题 As pointed out [in one of my questions on SO] (Why a simple configuration in MassTransit creates 2 queues and 3 exchanges?), MassTransit for RabbitMQ creates automatically a certain number of queues and exchange for a given simple configuration: Exchanges, all fanouts: ConsoleApp1:Program-YourMessage : Durable VP0003748_dotnet_bus_6n9oyyfzxhyx9ybobdmpj8qeyt : Auto-delete and Durable? test_queue : Durable Queues: VP0003748_dotnet_bus_6n9oyyfzxhyx9ybobdmpj8qeyt : x-expire 60000 test_queue :

How to override MassTransit default exchange and queue topology convention?

只谈情不闲聊 提交于 2021-02-07 20:53:06
问题 As pointed out [in one of my questions on SO] (Why a simple configuration in MassTransit creates 2 queues and 3 exchanges?), MassTransit for RabbitMQ creates automatically a certain number of queues and exchange for a given simple configuration: Exchanges, all fanouts: ConsoleApp1:Program-YourMessage : Durable VP0003748_dotnet_bus_6n9oyyfzxhyx9ybobdmpj8qeyt : Auto-delete and Durable? test_queue : Durable Queues: VP0003748_dotnet_bus_6n9oyyfzxhyx9ybobdmpj8qeyt : x-expire 60000 test_queue :

In MassTransit if I set a TTL for a scheduled message, is the initial delay included?

有些话、适合烂在心里 提交于 2021-01-29 21:20:48
问题 In MassTransit, if I schedule a message to be delivered in the future (let's say in 3 days), and I set a TTL on the message for 1 day, is the actual TTL for the message then 4 days? If I schedule a message 30 days in the future, I'm tempted to set the TTL to 30 + 1 days, but I don't want to do that in case that adds another 30 days of TTL that I am unaware of. 回答1: From looking at the MassTransit repository, it seems like the TTL is applied upon the message being sent, rather than when it was