Setting Topic Max Size

135 views
Skip to first unread message

Brandon Darling

unread,
May 26, 2021, 10:04:48 AM5/26/21
to masstransit-discuss
How can I set the max size of a topic (not queue). The only place I can configure anything like that seems to be queue specific.

Thanks,

Brandon

var busControl = Bus.Factory.CreateUsingAzureServiceBus(c =>
            {
                // Set to 5 GB, this doesnt work
                c.MaxSizeInMegabytes = 5 * 1024;

                c.Host(connectionString);
                
                c.SubscriptionEndpoint("subscriber-1", "test-messages", x =>
                {
                    // .. more config
                });
            });

Chris Patterson

unread,
May 26, 2021, 1:15:33 PM5/26/21
to masstrans...@googlegroups.com
Setting it on the bus factory configurator only affects the bus endpoint. You'd need to set the size on the subscription (x, your code).

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/e6157722-4cc4-4d62-a3d8-90f92f744b1bn%40googlegroups.com.

Brandon Darling

unread,
May 26, 2021, 3:12:26 PM5/26/21
to masstransit-discuss
Thanks, but I dont see that property on IServiceBusSubscriptionEndpointConfigurator. Looking at the source code, its only on IServiceBusQueueEndpointConfigurator.

Am I missing something?

Thanks,

Brandon

Chris Patterson

unread,
May 26, 2021, 5:26:30 PM5/26/21
to masstrans...@googlegroups.com
Oh, subscriptions are part of the topic, and you set a limit on the actual topic (which includes all subscriptions).

Publish topology is used to configure topics: https://masstransit-project.com/advanced/topology/servicebus.html


Reply all
Reply to author
Forward
0 new messages