sharding

open override fun sharding(aggregateId: AggregateId): String

Determines the shard for the given aggregate ID.

This method extracts the named aggregate from the aggregate ID, looks up the corresponding sharding strategy in the registrar, and delegates the sharding decision to that strategy.

Return

The shard identifier (node name, partition key, etc.)

Parameters

aggregateId

The aggregate ID to shard

Throws

if no sharding strategy is registered for this aggregate type