Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 57. Implementing the Interceptors Processing Logic
Abstract
Interceptors are straightforward to implement. The bulk of their processing logic is in the
handleMessage()
method. This method receives the message data and manipulates it as needed. Developers may also want to add some special logic to handle fault processing cases.
57.1. Interceptor Flow
Figure 57.1, “Flow through an interceptor” shows the process flow through an interceptor.
Figure 57.1. Flow through an interceptor

Messages normally pass through an interceptor's handleMessage() method. In the event of a fault occurring at either the current interceptor or a later interceptor, the messages will pass through the interceptor's handleFault() method.
In normal message processing, only the
handleMessage()
method is called. The handleMessage()
method is where the interceptor's message processing logic is placed.
If an error occurs in the
handleMessage()
method of the interceptor, or any subsequent interceptor in the interceptor chain, the handleFault()
method is called. The handleFault()
method is useful for cleaning up after an interceptor in the event of an error. It can also be used to alter the fault message.