pick Up
Picks up the shard at a given index to process.
This action is intended to be exclusive, i.e. a single shard may be served by a single application node at a given moment of time.
In case of a successful operation, an instance of PickUpOutcome containing ShardSessionRecord
is returned. The node obtained the session should perform the desired actions with the sharded messages and then release() the session.
In case the shard at a given index is already picked up by some node, an PickUpOutcome containing ShardAlreadyPickedUp is returned. This outcome contains information about the WorkerId
of the worker who owns the session and the Timestamp
when the shard was picked up.
Return
acknowledgement showing the result of the operation
Parameters
the index of the shard to pick up for processing
the identifier of the node for which to pick the shard