Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of Batch Operations (enableBatchedOperations) in Topic/Subs in Azure Service Bus?

I have a topic with two subscriptions. batchoperation is disabled at both topic level and subs level:

TopicDescription td = new TopicDescription(topicName);
td.setEnableBatchedOperations(false);
managementClient.createTopic(td);

SubscriptionDescription sd1 = new SubscriptionDescription(topicName, subOne);
sd1.setEnableBatchedOperations(false);

managementClient.createSubscription(sd1, somerule);

//2nd sub creation skipped

I verified these settings thru Service Bus Explorer.

However, I am still able to send messages to topic in batch mode using TopicClient.sendBatch(Collection<? extends IMessage> messages) method. And I am able to read messages from each Sub using IMessageReceiver.receiveBatch(int maxMessageCount). How is this possible? Did I not understand the purpose of enableBatchedOperations?

What is the purpose of enableBatchedOperations?

like image 819
Faraz Avatar asked Nov 22 '25 02:11

Faraz


1 Answers

When you send a batch of messages, that's a client-side batching. Entity level batching is designed to improve broker-side throughput with some added latency. See documentation here.

like image 167
Sean Feldman Avatar answered Nov 24 '25 22:11

Sean Feldman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!