Lars Kemmann
Lars Kemmann

Reputation: 5674

Maximum length for string ActorId

What is the maximum length for a string-based ActorId? And if there is a difference between the maximum possible length and the maximum recommended length, what is the difference and why?

Upvotes: 1

Views: 192

Answers (1)

Hasibur Rahman - MSFT
Hasibur Rahman - MSFT

Reputation: 116

ActorId, per se, does not have a specified limit on length of string-based id. However, while choosing a length for string-based ActorId, you should keep following points in consideration:

1) The ActorStateProvider (implementation of IActorStateProvider) stores named-state(s) and reminder(s) for actor. Depending on the implementation, it may have a specific limit on length of string-based ActorId as internally it will be using a combination ActorId, actor state-name and reminder-name (and possibly some internal metadata tags) to uniquely identify persisted named-state(s) and reminder(s) for a given actor.

2) The default ActorStateProvider for actors is KvsActorStateProvider. It is implemented on top a key-value store. It has a key length limit of 872 characters. I would recommend leaving 50 characters for internal metadata tagging and you can use remaining characters to distribute between your string-based ActorId(s) and actor state-names/reminder-names based on you naming schemes.

Upvotes: 1

Related Questions