<p>I'm trying to replace some bespoke message queues with ActiveMQ, and I need to talk to them (a lot) from Perl.  ActiveMQ provides a Stomp interface and Perl has Net::Stomp, so this seems like it should be fine, but it's not.</p>

<p>Even if I send a BEGIN command over Stomp, messages sent with SEND are immediately published, and if I ABORT the transaction, nothing happens.</p>

<p>I can't find any clear answers suggesting that suggest it's not possible, that is is possible, or that there's a relevant bit of configuration.  Also, Stomp doesn't seem to be a great protocol for checking for error responses from the server.</p>

<p>Am I out of luck?</p>

BTW the best place to ask Perl/ActiveMQ/Stomp questions is the
ActiveMQ user forum
as lots of Perl-Stomp folks hang out there.
The trick with STOMP transactions is to make sure each message you send or each acknowledgement you make includes the transaction ID header. See the
transaction handling section of the STOMP protocol
.
The reason for this is that with STOMP you could have many transactions taking place at the same time if your client is multi threaded - along with some non-transacted operations.