JMS (listener) error handling strategy

What is the “right” way of handling errors in processing jms messages by the system under the test?

Are the errors supposed to be sent to the same reply queue where the normal reply messages picked by the gatling script?

My Context: I am using gatling jms to test Java (spring-jms) listeners for Oracle’s AQ.
Initially, the listeners under the test were not supposed to send replies, and there was no “jms_replyTo” header set in the incoming messages.
For the sake of gatling testing we added a special logic that would return something in case when the “jms_replyTo” header is set, which would cause spring-jms to send a reply to the gatling reply queue.

Good for the happy flow, but when an exception happens inside the listener, the custom logic is not invoked and the message is set to the AQ error queue. This means that the gatling simulation will not register anything for those faulty messages and will keep running till the timeout. Not so nice.

I see two ways for fixing this problem:

  1. Amend the java listener to force returning special “error” message to the reply queue on any error. Looks like might add some additional complexity to the code.
  2. Make gatling jms listen to both its own reply queue and the error queue. Doesn’t seem to be supported at the moment.

As my personal experience with JMS and gatling is limited, I would like to hear some advice before venturing any of these paths.