On Thu, Jul 9, 2009 at 7:41 PM, Lotsa<nos...@mailinator.com> wrote: > > I was wondering if anyone has a solution to testing camel routes that end > with an activemq endpoint. Specifically, > > <route> > <from ref="endpoint"/> > ...some logic... > <to ref="MyQueue"/> -> myQueue is a defined endpoint > ...activemq:queue:myqueue/in in my actual code > In my test code MyQueue is defined as > mock ...mock:MyQueue > </route> > > <route> > <from ref="MyQueue"/> > ...etc... > </route> > > The problem I am having is that I am getting an error stating that I cannot > consume from this endpoint. If I remove the second route I have no issues. > I understand that this will not work with a mock, so I was wondering what > the correct procedure would be to 'mock' out a queue
Instead of a JMS queue you should use seda instead. It behaves like a JMS queue but for intra JVM only. .to("seda:queue:foo") from("seda:queue:foo").to("mock:result"); > -- > View this message in context: > http://www.nabble.com/Problems-Unit-Testing-Camel-Routes-tp24414728p24414728.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus