如何对无状态 Service Fabric 服务进行分区

How partition a stateless Service Fabric service

我想对 无状态 Service Fabric 服务进行分区。我没有找到我该怎么做。 例如,我想将数字设置为 10。

ApplicationManifest.xml

  <Parameters>
    <Parameter Name="MyService_InstanceCount" DefaultValue="-1" />
    <Parameter Name="MyService_PartitionCount" DefaultValue="10" />
  </Parameters>

ApplicationManifest.xml

<Parameters>
    ...
    <Parameter Name="MyService_PartitionCount" DefaultValue="10" />
</Parameters>
...
<Service Name="MyService" ServicePackageActivationMode="ExclusiveProcess">
    <StatelessService ServiceTypeName="MyServiceType" InstanceCount="[MyService_InstanceCount]">
        <UniformInt64Partition PartitionCount="[MyService_PartitionCount]" LowKey="0" HighKey="9" />
    </StatelessService>
</Service>