camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g8torPaul <>
Subject CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ
Date Wed, 29 Oct 2014 13:15:33 GMT
I have an inbound CXF webservice that consumes a SOAP message off a JMS
The endpoint is configured via Camel Spring using the
The JMS Configuration is setup to consume off an ActiveMQ JMS queue and it
is transactional.
The CXF endpoint has a inbound interceptor for WSSecurity.
If a user sends in a SOAP message with invalid Security headers the CXF
endpoint interceptor will throw an exception.
The exception gets processed by the internal Spring DMLC used by the CXF
JMSConfigFeature and a rollback is initiated. 
Since our ActiveMQ is setup with a redelivery policy to continuously
redeliver the message, the message gets rolled back to the queue and gets

The problem is that the message gets another exception upon redelivery and
repeats the cycle infinitely which results in blocking the JMS queue (which
only has one a consumer).

I am trying to figure out how to handle this special case of WSSecurity
exceptions such that I can dump the message to a log and remove the message
from the queue for redelivery.
Camel Exception handling (errorHandler, onException) does not help in this
case because the message never makes it into the route (the exception occurs
in an interceptor).

Does anyone know a way to handle this?



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message