Stub Component

Available as of Camel 2.10

The stub: component provides a simple way to stub out any physical endpoints for easy testing. Just add stub: in front of any endpoint URI and things just work.

Under the covers the Stub component creates VM endpoints.

So if you are in development and want to try a route out but don't want to connect to a specific SMTP or HTTP endpoint, just put stub: in front and stub it out!

URI format

stub:someUri

Where someUri can be any URI at all with any query.

Note the main difference between Stub and VM is that VM will validate the URI and parameters you give it; so putting vm: in front of a typical URI with query arguments will typically fail; Stub wont though, it will basically ignore all the query parameters to let you quickly just stub out one or more endpoints in your route temporarily.

Examples

Here's a few samples

See Also

© 2004-2011 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram