Don
Don

Reputation: 1

validation against xsd and route invalid xml to rabbitmq in mule

I am trying to validate xml again xsd and route invalid one to rabbitmq in mule.

I found schema validation component in mule but it seems like it only filter invalid one and pass valid one to the next flow.

Does anyone know how capture invalid one and route to rabbitmq queue in mule?

Thank you in advance.

Upvotes: 0

Views: 313

Answers (1)

ppiixx
ppiixx

Reputation: 139

You can wrap the schema validation inside a message filter.

This will pass the messages on to a flow named DeadLetterQueueFlow:

<message-filter onUnaccepted="DeadLetterQueueFlow" throwOnUnaccepted="false">
    <xml:schema-validation-filter/>
</message-filter>

Upvotes: 3

Related Questions