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

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

                Author: ASF GitHub Bot
            Created on: 22/Jul/22 11:03
            Start Date: 22/Jul/22 11:03
    Worklog Time Spent: 10m 
      Work Description: gtully commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927544011


##########
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PerfClientCommand.java:
##########
@@ -131,6 +134,7 @@ protected void onExecuteBenchmark(final ConnectionFactory 
producerConnectionFact
          .setTimeProvider(() -> 
TimeUnit.NANOSECONDS.toMicros(System.nanoTime()))
          .setCanDelayMessageCount(true)
          .setSharedSubscription(sharedSubscription)
+         .setClientID(UUID.randomUUID().toString())

Review Comment:
   it does need to be set, but it must be stable. a durable sub queue is 
identified by the clientId and subscriptionName pair, those need to be stable 
across connections such that a consumer gets back to the same underlying queue.
   typically the user provides both on the command line.





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

    Worklog Id:     (was: 794177)
    Time Spent: 50m  (was: 40m)

> artemis perf client --durable fails on exception
> ------------------------------------------------
>
>                 Key: ARTEMIS-3901
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3901
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.24.0
>            Reporter: Jan Å mucr
>            Priority: Major
>         Attachments: CliPerfClientTest.java
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The cli command
> {noformat}
> bin/artemis perf client --durable{noformat}
> fails with an exception:
> {noformat}
> java.lang.ClassCastException: class 
> org.apache.activemq.artemis.jms.client.ActiveMQQueue cannot be cast to class 
> javax.jms.Topic (org.apache.activemq.artemis.jms.client.ActiveMQQueue and 
> javax.jms.Topic are in unnamed module of loader 'app')
>       at 
> org.apache.activemq.artemis.cli.commands.messages.perf.MessageListenerBenchmark.start(MessageListenerBenchmark.java:213)
>       at 
> org.apache.activemq.artemis.cli.commands.messages.perf.PerfClientCommand.onExecuteBenchmark(PerfClientCommand.java:167)
>       at 
> org.apache.activemq.cli.test.CliPerfClientTest$1.onExecuteBenchmark(CliPerfClientTest.java:66)
>       at 
> org.apache.activemq.artemis.cli.commands.messages.perf.PerfCommand.execute(PerfCommand.java:79)
>       at 
> org.apache.activemq.cli.test.CliPerfClientTest.start(CliPerfClientTest.java:69)
>       at 
> org.apache.activemq.cli.test.CliPerfClientTest.testDurableStarts(CliPerfClientTest.java:79){noformat}
> Non-durable method works fine.
> See the attached test file or 
> https://github.com/jsmucr/activemq-artemis/tree/perf-client-durable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to