Conversation
phatboyg
left a comment
There was a problem hiding this comment.
Interesting effort, but a lot of confusing/unnecessary settings here that will just confuse people.
| x.AddConsumer<OrderSubmittedConsumer>(); | ||
| x.AddConsumer<OrderShippedConsumer>(e => | ||
| { | ||
| e.UseTimeout(c => c.Timeout = TimeSpan.FromSeconds(10)); |
There was a problem hiding this comment.
This isn't really used and probably just confuses people.
There was a problem hiding this comment.
Won't it fail the SB and not ack of the message handling takes to long?
Ie it will ensure failed process are put to failed?
But you are right it can be found easy enough, not needed here
| e.MaxDeliveryCount = 2; | ||
| e.RequiresSession = true; | ||
| e.MaxConcurrentCalls = 8; //like AZ Function default. 8 Concurrent consumers handling 1 ServiceBus Session | ||
| e.PrefetchCount = 0; |
There was a problem hiding this comment.
Not really a valid value you should specify.
There was a problem hiding this comment.
I guess you are right, it isn't needed AZ funcs prefect too with peek, as long as the prefect does not ack and respects sessions.
I believe it does, yes?
| e.AutoDeleteOnIdle = TimeSpan.FromDays(30); | ||
| e.MaxDeliveryCount = 2; | ||
| e.RequiresSession = true; | ||
| e.MaxConcurrentCalls = 8; //like AZ Function default. 8 Concurrent consumers handling 1 ServiceBus Session |
There was a problem hiding this comment.
Actually, no, MaxConcurrentCallsPerSession is the number of concurrent calls per session, which defaults to unassigned.
ConcurrentMessageLimit ultimately maps down to MaxConcurrentCalls at the transport level. I would avoid using the SB specific property here, but it's a subscription endpoint, so whatever.
There was a problem hiding this comment.
ConcurrentMessageLimit didn't respect sessions.
We had same session id coming on 2 threads.
I have a test / sample proving this. I will add here tomorrow
| cfg.SubscriptionEndpoint<OrderShipped>("order-shipped-consumer", e => | ||
| { | ||
| e.ConfigureConsumeTopology = false; | ||
| e.AutoStart = true; |
| cfg.Publish<OrderShippedBase>(configurator => configurator.Exclude = true); | ||
| cfg.SubscriptionEndpoint<OrderShipped>("order-shipped-consumer", e => | ||
| { | ||
| e.ConfigureConsumeTopology = false; |
There was a problem hiding this comment.
Is needed otherwise it will make unwanted service bus topics for interfaces and inheritance
You have a discussion recommending this?
There was a problem hiding this comment.
I'm referring to the ConfigureConsumeTopology = false
No description provided.