Adjusted order of looking for PERSISTENCE_MODULE, INFRASTRUCTURE_FACTORY and FACTORY_TOPIC in environment (so that legacy alternatives are looked for last).
@@ -593,17 +593,18 @@ class InfrastructureFactory(ABC):
# noinspection SpellCheckingInspection
topic = (
env.get(
- "INFRASTRUCTURE_FACTORY", # Legacy.
+ cls.PERSISTENCE_MODULE,
"",
)
or env.get(
- "FACTORY_TOPIC", # Legacy.
+ "INFRASTRUCTURE_FACTORY", # Legacy.
"",
)
or env.get(
- cls.PERSISTENCE_MODULE,
- "eventsourcing.popo:Factory",
+ "FACTORY_TOPIC", # Legacy.
+ "",
)
+ or "eventsourcing.popo"
)
try:
obj: Union[Type[TF], ModuleType] = resolve_topic(topic)
