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
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
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.
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
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.