It looks like you are implementing the transactional outbox pattern for your DB. In this case, I would create a consumer process that reads messages and routes them to the appropriate workflow in the form of signals. Consider using signalWithStart to crate workflows lazily.