Wildcard (*) only matches existing (known) topics at subscription time. Topics
created after subscribing are ignored
--------------------------------------------------------------------------------------------------------------------
Key: AMQ-3080
URL: https://issues.apache.org/jira/browse/AMQ-3080
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.5.0
Environment: RHEL 5, Kernel 2.6.18-128.el5xen, OpenJDK 1.6.0-b09 64-bit
Reporter: Ricardo Ramalho
Fix For: 5.5.0
When subscribing to a topic using asterisks (*), only topics that existed prior
to subscription are subscribed. Topics created afterward are ignored.
The > wildcard does not have this behaviour. It also subscribes topics created
after the subscription.
To trigger the bug:
1. Restart ActiveMQ, so that it is started with no topics.
2. Subscribe to *.*.rgr.bam.>
3. Publish to a.b.rgr.bam.a
4. Publish to a.b.rgr.bam.b
5. Publish to a.b.rgr.bam.c
# 3, 4 and 5 will not be visible by 2, because no topics existed when 2
subscribed
6. Kill subscriber 2. Restart it, subscribing again to *.*.rgr.bam.>
7. Publish to a.b.rgr.bam.a
8. Publish to a.b.rgr.bam.b
9. Publish to a.b.rgr.bam.c
# 7,8 and 9 will now be seen by 6, because the topics were created before 6's
subscription
10. Publish to a.b.rgr.bam.d
11. Publish to a.b.rgr.bam.e
12. Publish to a.b.rgr.bam.f
# Again, 10, 11 and 12 will not be seen by 6
Final toughts:
If you subscribe to > during this tests, all messages will be received. I
beleive this should also be the behaviour of the * wildcard. 3 and 6 should
also see all events.
For the test, I used stompcat to publish, and a small java program to subscribe
(using activewire).
I also verified (using tcpdump) that ActiveMQ did not send the missing messages
to 3 and 6, so the problem should be there, not on the client libraries.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.