[ 
https://issues.apache.org/jira/browse/ARTEMIS-3369?focusedWorklogId=618375&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618375
 ]

ASF GitHub Bot logged work on ARTEMIS-3369:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/21 12:55
            Start Date: 03/Jul/21 12:55
    Worklog Time Spent: 10m 
      Work Description: erwindon edited a comment on pull request #3638:
URL: https://github.com/apache/activemq-artemis/pull/3638#issuecomment-873396557


   my test cases are command-line based (as this is a fix for the cli).
   
   BEFORE:
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
topic://dest1 --durable --clientID client1` --> ok, server sees topic "dest1" 
(durable used so that a proper screenshot can be made even after the command 
terminates)
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
queue://dest2` --> ok, server sees queue "dest2"
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
xyz://dest3` --> FAIL, server sees queue "dest3", the prefix `xyz://` was not 
recognized by the CLI and was still removed.
   
   
![before](https://user-images.githubusercontent.com/3663742/124353439-dd8f4280-dc06-11eb-8f9b-7ecdba41c2b5.png)
   
   
   AFTER:
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
topic://dest1 --durable --clientID client1` --> ok, server sees topic "dest1", 
same behaviour as before
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
queue://dest2` --> ok, server sees topic "dest2", same behaviour as before
   `artemis consumer --protocol amqp --url amqp://localhost:5672 --destination 
xyz://dest3` --> ok, server sees queue `xyz://dest3`, the prefix `xyz://` was 
not recognized by the CLI and was now not removed. now prefix `xyz://` by 
itself is not useful and is used here for demonstration, but this fix allows 
the free use of prefixes that are recognized by the server in the 
`anycastPrefix` or `multicastPrefix` as configured with an acceptor.
   
   
![after](https://user-images.githubusercontent.com/3663742/124353447-e41dba00-dc06-11eb-9e67-7654e3b926aa.png)
   
   See also 
https://activemq.apache.org/components/artemis/documentation/latest/address-model.html#configuring-an-anycast-prefix
 for the documentation on these prefixes.
   
   There is a very small overlap with 
[ARTEMIS-3153](https://issues.apache.org/jira/browse/ARTEMIS-3153), as the 
issue here was found while creating a reproducer for ARTEMIS-3153.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 618375)
    Time Spent: 2h 10m  (was: 2h)

> CLI removes server-side prefixes from a given address
> -----------------------------------------------------
>
>                 Key: ARTEMIS-3369
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3369
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.17.0
>            Reporter: Erwin Dondorp
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The Artemis CLI variations {{producer}}, {{consumer}}, {{browse}} and 
> {{transfer}}, all prepare a destination using function {{getDestination}}. 
> However, this function also removes a prefix that it was not looking for. It 
> tests for a topic prefix ({{topic://}}) and then removes any prefix that was 
> present.
> It should explicitly test for the 2 prefixes it cares about ({{topic://}} and 
> {{queue://}}) and then remove only a recognized prefix when it was present.
> PR is present.
>   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to