You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by spulatkan <se...@hotmail.com> on 2013/04/11 14:19:21 UTC
Validate message of VirtualTopic before it reaches to consumers
Hi,
I am trying to validate message that is sent to a Virtual Topic, using
validator:xsd (message is XML in TextMessage), and when it fails the
validation, I want to redirect the message to another topic, and stop
processing, so do not send it to usual consumers. Because consumers will
fail with invalid message.
I wanted to do validation with routing, so validating once, instead of doing
it on multiple consumers.
Is this possible with Camel? and what would be the syntax?
my current approach is like this:
The problems are
- I see 10 times "Validating order created body" and 10 times "Message sent
to VirtualTopic.order.created.error" in the logs
- On webconsole, I see 10 messages enqueued in error topic for one message
of main topic.
- I see 10 consumers on VirtualTopic.order.created
- The consumer of VirtualTopic.order.created still gets the invalid message
(for once not 10)
Could you please help me to find the right syntax to intercept message
before it goes to consumers of VirtualTopic?
Thanks,
Seckin
--
View this message in context: http://camel.465427.n5.nabble.com/Validate-message-of-VirtualTopic-before-it-reaches-to-consumers-tp5730714.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Validate message of VirtualTopic before it reaches to consumers
Posted by spulatkan <se...@hotmail.com>.
10 messages, and 10 times validations were my fault. I have noticed another
thread
<http://camel.465427.n5.nabble.com/concurrentConsumers-basic-question-td4535789.html>
a bit late. My configuration was 10 concurrentConsumers as default. Now I
changed route to have parameters
"?maxConcurrentConsumers=1&concurrentConsumers=1" now I see validation once,
and one consumer on VirtualTopic, and 1 message enqueued on error topic.
But still I am receiving a message to Consumer queues of main topic. Is
there a syntax to prevent that?
--
View this message in context: http://camel.465427.n5.nabble.com/Validate-message-of-VirtualTopic-before-it-reaches-to-consumers-tp5730714p5730715.html
Sent from the Camel - Users mailing list archive at Nabble.com.