문제

Im trying to implement a simple message observer on Mule that don't need to mutate the message.

This link on the documentation says that the easiest way is to extend the AbstractMessageObserver. But as i can see on this link the class has been removed in the earlier versions of Mule.

So, the best way to do this now is implementing the MessageProcessor interface and simply return the MuleEvent param in the process method?

도움이 되었습니까?

해결책

If you need to access the whole MuleEvent, either a MessageProcessor or a POJO that implements Callable.

Otherwise, if you only need to observe the payload a simple POJO component would do the trick.

Note that Mule also offers interceptors (and InterceptingMessageProcessors): use an interceptor if you need to run before/after actions or if you want the possibility to stop processing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top