diff --git a/dramatiq/actor.py b/dramatiq/actor.py index ad9fcbaf..fbca5ea0 100644 --- a/dramatiq/actor.py +++ b/dramatiq/actor.py @@ -64,6 +64,9 @@ def __init__( priority: int, options: Dict[str, Any], ) -> None: + if actor_name in broker.actors: + raise ValueError(f"An actor named {actor_name!r} is already registered.") + self.logger = get_logger(fn.__module__, actor_name) self.fn = async_to_sync(fn) if iscoroutinefunction(fn) else fn self.broker = broker