Azure 服务总线 Topic/Subs 中批处理操作 (enableBatchedOperations) 的用途?
Purpose of Batch Operations (enableBatchedOperations) in Topic/Subs in Azure Service Bus?
我有一个主题有两个订阅。 batchoperation 在主题级别和子级别都被禁用:
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
我通过服务总线资源管理器验证了这些设置。
但是,我仍然可以使用 TopicClient.sendBatch(Collection<? extends IMessage> messages)
方法以批处理模式向主题发送消息。而且我能够使用 IMessageReceiver.receiveBatch(int maxMessageCount)
从每个 Sub 读取消息。这怎么可能?难道我不明白的目的
enableBatchedOperations?
enableBatchedOperations 的目的是什么?
当您发送一批消息时,这就是客户端批处理。
实体级批处理旨在通过增加一些延迟来提高代理端吞吐量。请参阅文档 here。
我有一个主题有两个订阅。 batchoperation 在主题级别和子级别都被禁用:
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
我通过服务总线资源管理器验证了这些设置。
但是,我仍然可以使用 TopicClient.sendBatch(Collection<? extends IMessage> messages)
方法以批处理模式向主题发送消息。而且我能够使用 IMessageReceiver.receiveBatch(int maxMessageCount)
从每个 Sub 读取消息。这怎么可能?难道我不明白的目的
enableBatchedOperations?
enableBatchedOperations 的目的是什么?
当您发送一批消息时,这就是客户端批处理。 实体级批处理旨在通过增加一些延迟来提高代理端吞吐量。请参阅文档 here。