You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kyle Himmerick (JIRA)" <ji...@apache.org> on 2006/05/18 17:32:51 UTC

[jira] Created: (AMQ-714) Wildcard support for policy entries produces unexpected results

Wildcard support for policy entries produces unexpected results
---------------------------------------------------------------

         Key: AMQ-714
         URL: https://issues.apache.org/activemq/browse/AMQ-714
     Project: ActiveMQ
        Type: Bug

  Components: Broker  
    Versions: 4.0, 4.0 RC3    
 Environment: linux
ibm jdk 1.4.2
sun jdk 1.5
    Reporter: Kyle Himmerick
     Fix For: 4.0


When you define a policy Entry using a wildcard (eg. FOO.>) in the xml configuration it is not applied as expected.

Specifically I was attempting to use a lastImageSubscriptionRecoveryPolicy on all subtopics of FOO.>

If I publish three messages to each of FOO.a, FOO.b and FOO.c and then setup a consumer (retroactive = true) to each of the topics FOO.a, FOO.b and FOO.c I receive three copies of the last message sent to any of the topics  In this case the third message sent to FOO.c.

Expected behaviour would be to receive the last message from each topic that is message three from FOO.a, FOO.b and FOO.c

More troubling is if I setup a new session with a consumer only to FOO.a and FOO.b I receive two copied of the third message sent to FOO.c.  Even though this session is not subscribed to FOO.c, presumably this is because the policy is only keeping the last message that matches the destination and returning it as the last image, regardless of if the topic matches the subscription.

With explicit policy entries for each topic (FOO.a, FOO.b) the broker returns the correct messages, so I believe the problem is with wildcard handling.  I need wildcard support here because I do not know my topic names upfront.  I would think that this would be a common scenario (like setting a last image recovery policy on all stock quotes Stock.> )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AMQ-714) Wildcard support for policy entries produces unexpected results

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-714?page=all ]
     
Hiram Chirino resolved AMQ-714:
-------------------------------

    Resolution: Fixed

Just commited a fix that copies the policy object for each configured destination, it was previously being shared by multiple destinations which is what caused the problems.  Fix is in the 4.1 and 4.0 branches.

> Wildcard support for policy entries produces unexpected results
> ---------------------------------------------------------------
>
>          Key: AMQ-714
>          URL: https://issues.apache.org/activemq/browse/AMQ-714
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker
>     Versions: 4.0, 4.0 RC3
>  Environment: linux
> ibm jdk 1.4.2
> sun jdk 1.5
>     Reporter: Kyle Himmerick
>      Fix For: 4.1, 4.0.1
>  Attachments: issue.zip
>
> Original Estimate: 2 minutes
>         Remaining: 2 minutes
>
> When you define a policy Entry using a wildcard (eg. FOO.>) in the xml configuration it is not applied as expected.
> Specifically I was attempting to use a lastImageSubscriptionRecoveryPolicy on all subtopics of FOO.>
> If I publish three messages to each of FOO.a, FOO.b and FOO.c and then setup a consumer (retroactive = true) to each of the topics FOO.a, FOO.b and FOO.c I receive three copies of the last message sent to any of the topics  In this case the third message sent to FOO.c.
> Expected behaviour would be to receive the last message from each topic that is message three from FOO.a, FOO.b and FOO.c
> More troubling is if I setup a new session with a consumer only to FOO.a and FOO.b I receive two copied of the third message sent to FOO.c.  Even though this session is not subscribed to FOO.c, presumably this is because the policy is only keeping the last message that matches the destination and returning it as the last image, regardless of if the topic matches the subscription.
> With explicit policy entries for each topic (FOO.a, FOO.b) the broker returns the correct messages, so I believe the problem is with wildcard handling.  I need wildcard support here because I do not know my topic names upfront.  I would think that this would be a common scenario (like setting a last image recovery policy on all stock quotes Stock.> )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AMQ-714) Wildcard support for policy entries produces unexpected results

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-714?page=all ]

Hiram Chirino updated AMQ-714:
------------------------------

    Fix Version: 4.0.1
                 4.1
                     (was: 4.0)

> Wildcard support for policy entries produces unexpected results
> ---------------------------------------------------------------
>
>          Key: AMQ-714
>          URL: https://issues.apache.org/activemq/browse/AMQ-714
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker
>     Versions: 4.0, 4.0 RC3
>  Environment: linux
> ibm jdk 1.4.2
> sun jdk 1.5
>     Reporter: Kyle Himmerick
>      Fix For: 4.1, 4.0.1
>  Attachments: issue.zip
>
> Original Estimate: 2 minutes
>         Remaining: 2 minutes
>
> When you define a policy Entry using a wildcard (eg. FOO.>) in the xml configuration it is not applied as expected.
> Specifically I was attempting to use a lastImageSubscriptionRecoveryPolicy on all subtopics of FOO.>
> If I publish three messages to each of FOO.a, FOO.b and FOO.c and then setup a consumer (retroactive = true) to each of the topics FOO.a, FOO.b and FOO.c I receive three copies of the last message sent to any of the topics  In this case the third message sent to FOO.c.
> Expected behaviour would be to receive the last message from each topic that is message three from FOO.a, FOO.b and FOO.c
> More troubling is if I setup a new session with a consumer only to FOO.a and FOO.b I receive two copied of the third message sent to FOO.c.  Even though this session is not subscribed to FOO.c, presumably this is because the policy is only keeping the last message that matches the destination and returning it as the last image, regardless of if the topic matches the subscription.
> With explicit policy entries for each topic (FOO.a, FOO.b) the broker returns the correct messages, so I believe the problem is with wildcard handling.  I need wildcard support here because I do not know my topic names upfront.  I would think that this would be a common scenario (like setting a last image recovery policy on all stock quotes Stock.> )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AMQ-714) Wildcard support for policy entries produces unexpected results

Posted by "Kyle Himmerick (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-714?page=all ]

Kyle Himmerick updated AMQ-714:
-------------------------------

    Attachment: issue.zip

The attached zip contains two xbean configurations
wildcard.xml defines a last image recovery policy  on FOO.*
explicit.xml defines a last image recovery policy on FOO.X, FOO.Y, and FOO.Z

There are two java files each with a main method taking one argument as the brokerURL
Publisher.java publishes three messages to each of the FOO topics, run this first to put messages in each topic
Subscriber.java establishes a retroactive consumer on each of the FOO topics, it prints to System.out as messages arrive

Notice that with the wildcard.xml you'll receive three copies of the last message sent to any FOO.* topic (in this case message 2 FOO.Z).

Also if you set Subscriber to not consumer messages on FOO.Z you will still receive two copies of the message 2 on FOO.Z

> Wildcard support for policy entries produces unexpected results
> ---------------------------------------------------------------
>
>          Key: AMQ-714
>          URL: https://issues.apache.org/activemq/browse/AMQ-714
>      Project: ActiveMQ
>         Type: Bug

>   Components: Broker
>     Versions: 4.0, 4.0 RC3
>  Environment: linux
> ibm jdk 1.4.2
> sun jdk 1.5
>     Reporter: Kyle Himmerick
>      Fix For: 4.0
>  Attachments: issue.zip
>
> Original Estimate: 2 minutes
>         Remaining: 2 minutes
>
> When you define a policy Entry using a wildcard (eg. FOO.>) in the xml configuration it is not applied as expected.
> Specifically I was attempting to use a lastImageSubscriptionRecoveryPolicy on all subtopics of FOO.>
> If I publish three messages to each of FOO.a, FOO.b and FOO.c and then setup a consumer (retroactive = true) to each of the topics FOO.a, FOO.b and FOO.c I receive three copies of the last message sent to any of the topics  In this case the third message sent to FOO.c.
> Expected behaviour would be to receive the last message from each topic that is message three from FOO.a, FOO.b and FOO.c
> More troubling is if I setup a new session with a consumer only to FOO.a and FOO.b I receive two copied of the third message sent to FOO.c.  Even though this session is not subscribed to FOO.c, presumably this is because the policy is only keeping the last message that matches the destination and returning it as the last image, regardless of if the topic matches the subscription.
> With explicit policy entries for each topic (FOO.a, FOO.b) the broker returns the correct messages, so I believe the problem is with wildcard handling.  I need wildcard support here because I do not know my topic names upfront.  I would think that this would be a common scenario (like setting a last image recovery policy on all stock quotes Stock.> )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira