It depends on the version of JBossESB you are using.
If you are using CP1 of the SOA Platform or ESB 4.3.GA then you can do one of the following to cause an exception to be thrown instead of retrying the delivery.
set the property org.jboss.soa.esb.exceptionOnDeliverFailure on the message to 'true'
set the same property in jbossesb-properties.xml "core" to "true"
The task covering this work is http://jira.jboss.com/jira/browse/JBESB-1556
Thanks for the reply.
I am using JBoss SOA p4.2.0.
Can I still use the approach you mentioned in the post? or are there other ways to do it?
If you are using SOA-P 4.2.0 CP1 then yes. If you have not yet updated then it is not possible, sorry.