Hi You can use the mock component instead. However you cannot consume from a mock endpoint.
For JMS you can also easily embed and use Apache ActiveMQ. On Wed, Aug 10, 2011 at 10:36 AM, jason.parr <[email protected]> wrote: > Hi, > > I want to test my 'production' route unchanged using CamelTestSupport. > > As show in the doco I stub out jms component with an inprocess trasnport say > seda: > > @Override > protected CamelContext createCamelContext() throws Exception { > CamelContext context = super.createCamelContext(); > context.addComponent("jms", context.getComponent("seda")); > ... > > This works fine until any of my jms endpoints in the 'production' route have > jms specific parameter, e.g. > > from("direct:tradebus-trades") > .to("jms:topic:NOMURA.FIET.STP.RADIAL.TRADES?&disableReplyTo=true"); > > When I run my test I now get: > > org.apache.camel.FailedToCreateRouteException: ... There are 1 parameters > that couldn't be set on the endpoint. Check the uri if the parameters are > spelt correctly and that they are properties of the endpoint. Unknown > parameters=[{disableReplyTo=true}] > > What's the best way of replacing jms with an inprocess transport without > having to change the original route? > > In my test I add an extra a file endpoint to play messages into the original > route, which seems to work fine. > > @Override > protected RouteBuilder createRouteBuilder() throws Exception { > return new RadialRouteBuilder() { > @Override > public void configure() { > super.configure(); > > > from("file:src/test/data/radial-route-builder-test-case?noop=true&include=bond_msg.*") > .to("jms:queue:nomura.fiet.stp.bloomberg.bond-trades"); > > Thanks > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Stubbing-jms-with-an-inprocess-transport-when-using-CamelTestSupport-tp4685084p4685084.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
