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); //producer.sendBody("seda:pushStatusUpdate", "123"); 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 asume 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 --- On Tue, Aug 4, 2009 at 6:43 PM, Mick Knutson <mknut...@baselogic.com> wrote: > In theory, the Virtual topics seems to be able to suit my use case. The > only issue is trying to test for it. > > I am working with Camel routing as well. So let me try a bit more to get a > working test to send a testMessage into my Virtual topic, then consume it. I > think I might be close. > > I will post the results in the morning. > > --- > 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 Tue, Aug 4, 2009 at 6:37 PM, Willem Jiang <willem.ji...@gmail.com>wrote: > >> Hi, >> >> activemq-camel is much high level API, we should make sure the ActiveMQ >> provides this kind of feature. >> I just checked the Unit test code, it looks like we need to create the >> physical queue before the producer send the message. >> >> Mick does this OK for you ? >> Or you may still need to try durable top subscription. >> >> Willem >> >> >> Mick Knutson wrote: >> >>> Where can I find >>> >>> import org.apache.activemq.spring.ConsumerBean; >>> >>> I have looked at the activemq-camel and activemq-core jars and they are >>> not >>> there. >>> >>> It appears to be just for testing? >>> >>> --- >>> 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 Tue, Aug 4, 2009 at 1:14 PM, Joe Fernandez < >>> joe.fernan...@ttmsolutions.com> wrote: >>> >>> In the AMQ source tree, check out >>>> .../activemq-core/src/test/java/org/apache/activemq/broker/virtual >>>> >>>> Joe >>>> http://www.ttmsolutions.com >>>> >>>> >>>> Mick Knutson-3 wrote: >>>> >>>>> I am fine with the default, I guess I just an not clear how to start >>>>> writing >>>>> a test to verify each piece. >>>>> >>>>> 1. Testing that my publisher can create messages going to: >>>>> VirtualTopic.*table123 (<name assigned bypublisher>*) >>>>> >>>>> >>>>> >>>>> 2. Writing a test that 2 different consumers can consume messages on >>>>> >>>>> Consumer.<name assigned by consumer>.VirtualTopic.*table123 >>>>> >>>> (<name >>>> >>>>> assigned bypublisher>*) >>>>> >>>>> Such as: >>>>> Consumer.*A*.VirtualTopic.*table123 * >>>>> >>>>> >>>>> and: >>>>> Consumer.*B*.VirtualTopic.*table123 * >>>>> >>>>> >>>>> >>>>> A JUnit test would be amazing guidence. >>>>> >>>>> >>>>> --- >>>>> 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 Tue, Aug 4, 2009 at 3:52 PM, Joe Fernandez < >>>>> joe.fernan...@ttmsolutions.com> wrote: >>>>> >>>>> >>>>>> I believe that by default, the corresponding queue names must follow >>>>>> >>>>> this >>>> >>>>> syntax >>>>>> >>>>>> Consumer.<name assigned by consumer>.VirtualTopic.<name assigned by >>>>>> publisher> >>>>>> >>>>>> You can override the default naming convention via the >>>>>> <virtualDestinations> >>>>>> element. >>>>>> >>>>>> You might also want to look into using Camel to implement a similar >>>>>> messaging pattern (i.e., recipient list). >>>>>> >>>>>> http://www.enterpriseintegrationpatterns.com/RecipientList.html >>>>>> >>>>>> Joe >>>>>> http://www.ttmsolutions.com >>>>>> >>>>>> >>>>>> >>>>>> Mick Knutson-3 wrote: >>>>>> >>>>>>> Tell me if this is correct about how to use a Virtual Topic and >>>>>>> remote >>>>>>> Client consumers: >>>>>>> >>>>>>> Basically, I create a Virtual topic as a destination for a new >>>>>>> Message >>>>>>> >>>>>> I >>>>>> >>>>>>> create and send it to: "*jms:VirtualTopic.Table.123*" >>>>>>> >>>>>>> Then by using a remote client running a MDP, I can have each client >>>>>>> subscribe to "*jms:Player.A.VirtualTopic.Table.123*", "* >>>>>>> jms:Player.B.VirtualTopic.Table.123*", >>>>>>> "*jms:Player.C.VirtualTopic.Table.123 >>>>>>> *", etc... >>>>>>> >>>>>>> >>>>>>> This will essentially give me, in AMQ, 1 topic for >>>>>>> *VirtualTopic.Table.123*and then for each client I start, I should be >>>>>>> able to get a message on a >>>>>>> queue "*Player.A.VirtualTopic.Table.123*" ??? >>>>>>> >>>>>>> Just seems like I am missing something on the creation of the Virtual >>>>>>> Topics >>>>>>> and the Queues the consumer(s) connect to. >>>>>>> >>>>>>> Does anyone have examples of this? >>>>>>> >>>>>>> >>>>>>> --- >>>>>>> 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 >>>>>>> --- >>>>>>> >>>>>>> >>>>>>> -- >>>>>> View this message in context: >>>>>> >>>>>> >>>> http://www.nabble.com/Virtual-Topic-and-remote-Client-consumers-tp24814828p24815070.html >>>> >>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> >>>>> -- >>>> View this message in context: >>>> >>>> http://www.nabble.com/Virtual-Topic-and-remote-Client-consumers-tp24814828p24815475.html >>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>> >>>> >>>> >>> >> >