from .models import OutboxMessage def enqueue(topic: str, payload: dict) -> OutboxMessage: """Adds a message to the transactional outbox. Called inside the same DB transaction as the business change, so an order can never be committed without a corresponding 1C push task. """ return OutboxMessage.objects.create(topic=topic, payload=payload)