Shards within the replicator enable data to be parallelized when they are applied on the Target.
|Pre-configured filter name||
|tpm Option compatibility||
|Data compatibility||Any event|
||(none)||Number of shards to be used by the applier|
shardbyseqno filter updates the
shard ID, which is embedded into the event metadata, by a configurable
number of shards, set by the
shards parameter in the
The filter works by setting the shard ID in the event using the
setShardId() method on the event object:
event.setShardId(event.getSeqno() % shards);
Care should be taken with this filter, as it assumes that the events can be applied in a completely random order by blindly updating the shard ID to a computed valued. Sharding in this way is best used when provisioning new Targets.