A few thoughts:
- If you only have one db in your “db + topic” scenario does it need to be an XA transaction. Will a regular transaction not suffice?
- Some Transaction Managers (not all) support the concept of “last participant”. If yours does, could this be an option?
- Before we had Partitioned Queues we used to use a pattern for Sticky Load Balancing between queues when message order is important that is explained in this blog: https://solace.com/blog/sticky-load-balancing-in-solace-pubsub-event-broker/
Hope this helps.