createPartitionKey

fun createPartitionKey(id: UUID, partitions: Int): Int

Creates a partition key based on the given UUID and number of partitions. This method is used when stickiness is preferred.

Return

The generated partition key.

Parameters

id

The UUID to be used for generating the partition key.

partitions

The number of partitions.


fun createPartitionKey(partitions: Int): Int

Creates a partition key based on a random UUID and number of partitions. This method is used when randomness is preferred.

Return

The generated partition key.

Parameters

partitions

The number of partitions.