简体   繁体   中英

How partition a stateless Service Fabric service

I would like to partition a stateless Service Fabric service. I didn't find how can I do that. I want to set the number to 10 for example.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM