-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3: Remove one of DefaultPath / DefaultTopic #289
Comments
So you suggest in v3 we leave the one The cc: @EtherZa |
Yeah I would lean slightly towards "Path", too, as it's more neutral and less bus-specific jargon |
It may be worthwhile to have deeper look into the configuration as a whole in v3. I suspect a lot of it has come through organic growth (and perhaps operational bias) but there is generally a lot of repetition when configuring producers and consumers. This is exacerbated when a single queue is used for multiple message types resulting in a single consumer being created with multiple As an example, I use a local method similar to the one below to ease registration of messages/consumers being processed with shared subscriptions on Azure Service Bus. void AddConsumer<TMessage, TConsumer>(string subscriptionName, int instances = 20, int prefetch = 100)
where TConsumer : class, IConsumer<TMessage>
{
bus.Produce<TMessage>(x => x.DefaultTopic(busOptions.Topic));
bus.Consume<TMessage>(
cfg =>
{
var type = typeof(TMessage);
var typeName = resolver.ToName(type);
cfg
.Topic(busOptions.Topic)
.SubscriptionName(subscriptionName)
.Instances(instances)
.PrefetchCount(prefetch)
.WithConsumer<TConsumer>()
.SubscriptionSqlFilter($"MessageType='{typeName}'", Hash(typeName));
});
} Each message that is registered in this way results in a new The current implementation is obviously succinct when each message is consumed by its own queue. There are also other little niggles that make sense when you read through the code, but are not immediately obvious eg. |
It's not worth it dragging both along in the code base forever
The text was updated successfully, but these errors were encountered: