I have a standalone application (a simple command-line jar) which can already read or produce messages from/to an ActiveMQ queues (no Transaction).
I'd like to add the functionality to be able to read messages from a remote ActiveMQ queue and put it in another remote ActiveMQ queue. The 2 ActiveMQs may be completely different and not the same and I would also like to make sure no messages are lost during transfer should there be any connection issues.
I have been doing quite a lot of reading on transactions and as far as I understand, because I am transfering between 2 completely different ActiveMQs, a simple Spring JmsTransactionManager will not suffice but rather some sort of Distributed Transaction Management is needed (Like XA Transactions).
I am completely lost on the sea of code examples found on the internet regarding several different libraries and such.
Can anybody point me the way to find the simplest solution to this problem? Should I use JTA on top of Spring somehow (Is it even feasible to use JTA on a non-j2ee application server environment)? I am already using spring's jmstemplate to send/receive messages so would be great if I could keep using spring (and preferably no xml context config as I do everything programatically today).