azureservicebus - Azure 服务总线中主题/订阅中的批处理操作 (enableBatchedOperations) 的用途?
问题描述
我有一个有两个订阅的主题。在主题级别和子级别都禁用批处理操作:
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
我通过 Service Bus Explorer 验证了这些设置。
但是,我仍然可以使用TopicClient.sendBatch(Collection<? extends IMessage> messages)
方法以批处理模式向主题发送消息。而且我可以使用IMessageReceiver.receiveBatch(int maxMessageCount)
. 这怎么可能?我不明白 enableBatchedOperations 的目的吗?
enableBatchedOperations 的目的是什么?
解决方案
当您发送一批消息时,这就是客户端批处理。实体级批处理旨在通过增加一些延迟来提高代理端吞吐量。请参阅此处的文档。
推荐阅读
- c++ - c++ - 如何在结构中使用函数?
- c++ - 为什么通过 gcc 和 clang 的优化将大的 double 转换为 uint16_t 会给出不同的答案
- php - 像yii2中arraylist中右侧匹配%的运算符
- c# - 在asp.net mvc的产品列表中显示类别描述(一次)
- exec - 使用 MSDOS EXEC API 调用程序(int21h with AX=4Bh)
- react-native - React Native Navigation:在屏幕之间导航(真的需要帮助)
- sorting - 使用指针对二维数组进行排序
- android - 程序类型已经存在:com.squareup.picasso.Action$RequestWeakReference
- angular - 如果在 package.json 中添加了新的依赖项并在组件文件中使用它,如何更新 Angular 应用程序?
- sql - (Microsoft SQL Server Management Studio 17) AND / LIKE 运算符灰显