That is what I am trying to wrap my head around. I am trying to figure out a way to either create a consumer like: http://camel.apache.org/activemq.html
But still can't seem to understand how to fit this into a unit test in question. Not sure how that sets a remote destination which is what I need right? --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring & Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Wed, Aug 5, 2009 at 6:03 PM, Willem Jiang <willem.ji...@gmail.com> wrote: > Can your consumer start to receive the message before calling the > sendStatusUpdate method ? > > You may need using other thread to call the sendStatusUpdate. > > Willem > > Mick Knutson wrote: > >> Is there anything else I would have to setup with my embedded broker to be >> able to test sending a message to a VirtualTopic to get routed to the >> subscribed Queues? >> >> Here is what I have on my server: >> >> >> *...@endpointinject(uri="activemq:**VirtualTopic.TABLE.1") >> ProducerTemplate producer; >> >> public boolean sendStatusUpdate(String body) { >> log.info("//------------------**------------------------------** >> ----------------//"); >> log.info("sendStatusUpdate: " + body); >> log.info("//------------------**------------------------------** >> ----------------//"); >> >> //Send message to >> producer.sendBody("<hello>**world!</hello>"); >> >> return true; >> }* >> >> >> Here is my client unit test: >> >> *...@test >> public void testGetStatusUpdateMessage() throws Exception { >> log.info("testGetStatusUpdateMessage"); >> >> TableService tableService = (TableService) >> context.getBean("tableServiceProxy"); >> boolean response = tableService.sendStatusUpdate("123"); >> log.info("... the bet was successfully placed: " + response); >> assertTrue(response); >> >> String body = >> consumer.receiveBody("activemq:Player.1.VirtualTopic.TABLE.1", >> String.class); >> >> assertEquals("Hello World", body); >> >> }* >> >> >> Now I am not able to get any body messages on >> *activemq:Player.1.VirtualTopic.TABLE.1 >> a*nd I have only used the embedded broker at this point. >> >> So what actually happens is my tests run freezes. I assume it is waiting >> for >> a message to be delivered onto *activemq:Player.1.VirtualTopic.TABLE.1 >> *that >> never arrives. >> >> >> --- >> Thank You… >> >> Mick Knutson, President >> >> BASE Logic, Inc. >> Enterprise Architecture, Design, Mentoring & Agile Consulting >> p. (866) BLiNC-411: (254-6241-1) >> f. (415) 685-4233 >> >> Website: http://baselogic.com >> Linked IN: http://linkedin.com/in/mickknutson >> Vacation Rental: http://tahoe.baselogic.com >> --- >> >> >