Created
July 14, 2024 17:46
-
-
Save wullemsb/738ddefa34c33495d5df675a5ace84f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OrderSubmittedConsumerDefinition : | |
ConsumerDefinition<OrderSubmittedConsumer> | |
{ | |
public OrderSubmittedConsumerDefinition() | |
{ | |
EndpointName = "submitted-orders"; | |
ConcurrentMessageLimit = 4; | |
} | |
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, | |
IConsumerConfigurator<OrderSubmittedConsumer> consumerConfigurator) | |
{ | |
endpointConfigurator.UseMessageRetry(r => r.Interval(5, 1000)); | |
endpointConfigurator.UseInMemoryOutbox(); | |
} | |
} | |
public class PaymentProcessedConsumerDefinition : | |
ConsumerDefinition<PaymentProcessedConsumer> | |
{ | |
public PaymentProcessedConsumerDefinition() | |
{ | |
EndpointName = "processed-payments"; | |
ConcurrentMessageLimit = 4; | |
} | |
protected override void ConfigureConsumer(IReceiveEndpointConfigurator endpointConfigurator, | |
IConsumerConfigurator<PaymentProcessedConsumer> consumerConfigurator) | |
{ | |
endpointConfigurator.UseMessageRetry(r => r.Interval(5, 1000)); | |
endpointConfigurator.UseInMemoryOutbox(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment