Issue 52 in activemessaging: Messages from VirtualTopics not dispatched

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 14, 2010, 5:11:55 AM2/14/10
to activemessagin...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 52 by maarten.vanberkel: Messages from VirtualTopics not
dispatched
http://code.google.com/p/activemessaging/issues/detail?id=52

What steps will reproduce the problem?
1. Create a processor that subscribes to
/queue/Consumer.A.VirtualTopic.HelloWorld
2. Publish a message to /topic/VirtualTopic.HelloWorld

What is the expected output? What do you see instead?

I expect that the message is dispatched to the processor that was created
in step 1. It is not, because the ActiveMessaging::Subscription#matches?
returns false when it should return true.

What version of the product are you using? On what operating system?
Active Messaging 0.6.1 with Apache ActiveMQ 5.3.0 running on Mac OS X 10.6

Please provide any additional information below.
http://activemq.apache.org/virtual-destinations.html

I suspect that VirtualTopics is ActiveMQ specific, but I would love to see
it supported.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Mar 28, 2010, 5:54:42 AM3/28/10
to activemessagin...@googlegroups.com

Comment #1 on issue 52 by maarten.vanberkel: Messages from VirtualTopics
not dispatched
http://code.google.com/p/activemessaging/issues/detail?id=52

Implemented support for subscribing to Virtual Topics.

Please note that if you want to both publish and subscribe to a
VirtualTopic, you
have to define two destinations, eg:

ActiveMessaging::Gateway.define do |s|
s.destination :some_virtual_topic, '/topic/VirtualTopic.Topic1'

s.destination :some_virtual_topic_subscriber, '/queue/Consumer.A.VirtualTopic.Topic1'
end

You would use the first one for publishing, and the second one to subscribe
to.

Attachments:
issue_52_implemented_support_for_virtual_topics.patch 521 bytes

codesite...@google.com

unread,
Mar 29, 2010, 6:03:35 PM3/29/10
to activemessagin...@googlegroups.com

Comment #2 on issue 52 by kookster: Messages from VirtualTopics not
dispatched
http://code.google.com/p/activemessaging/issues/detail?id=52

This is a stomp specific fix. Works though, since early a13g code has a
slant towards
stomp, this seems like the right place to do it as the code is currently
organized.

A longer term fix would probably be to change the matches? method to
delegate to the
broker specific adapter (perhaps a class level method on the appropriate
adapter) so
that there can be stomp specific logic, amqp specific, etc.

codesite...@google.com

unread,
Mar 29, 2010, 6:16:06 PM3/29/10
to activemessagin...@googlegroups.com

Comment #3 on issue 52 by maarten.vanberkel: Messages from VirtualTopics
not dispatched
http://code.google.com/p/activemessaging/issues/detail?id=52

Hi Andrew,

Thanks for inspecting my patch.

I agree that the matches? method should be broker specific and hence part
of broker
specific adapters. Then it would also be easier to implement a proper fix
for issue 27.

I thought it would be to much to refactor on short term.

Would love to discuss how to properly implement a long term solution.

Maarten

codesite...@google.com

unread,
Mar 29, 2010, 6:43:46 PM3/29/10
to activemessagin...@googlegroups.com

Comment #4 on issue 52 by kookster: Messages from VirtualTopics not
dispatched
http://code.google.com/p/activemessaging/issues/detail?id=52

Agreed - shouldn't be too tough to update that method, and move the impl to
the
adpaters. We can put a default impl in the base adapter, and override in
the stomp.rb.

Reply all
Reply to author
Forward
0 new messages