You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/07/22 09:35:09 UTC

[GitHub] [activemq-artemis] jsmucr opened a new pull request, #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

jsmucr opened a new pull request, #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154

   https://issues.apache.org/jira/browse/ARTEMIS-3901


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] jsmucr commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
jsmucr commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927567912


##########
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:
   Aah, yes, I missed the line above:
   ```
            .setClientID(getClientID())
   ```



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] jsmucr commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
jsmucr commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927604708


##########
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:
   Thank you for review.



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] jsmucr commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
jsmucr commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927488458


##########
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:
   IIRC there was an exception which requested the client ID to be set. So I just tried doing this and it worked. I'm building now so I can't check. I'll be back. :-)



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] asfgit merged pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
asfgit merged PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] clebertsuconic commented on pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#issuecomment-1192629860

   I added a tweak and merged it


-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] jsmucr commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
jsmucr commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927489756


##########
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:
   There it is:
   ```
   java.lang.RuntimeException: javax.jms.IllegalStateException: Cannot create durable subscription - client ID has not been set
   
   	at org.apache.activemq.artemis.cli.commands.messages.perf.MessageListenerBenchmark.start(MessageListenerBenchmark.java:221)
   	at org.apache.activemq.artemis.cli.commands.messages.perf.PerfClientCommand.onExecuteBenchmark(PerfClientCommand.java:171)
   	at org.apache.activemq.artemis.cli.commands.messages.perf.PerfCommand.execute(PerfCommand.java:79)
   	at org.apache.activemq.artemis.cli.commands.messages.perf.PerfClientCommand.execute(PerfClientCommand.java:214)
   	at org.apache.activemq.cli.test.CliPerfClientTest$1.execute(CliPerfClientTest.java:55)
   	at org.apache.activemq.cli.test.CliPerfClientTest.start(CliPerfClientTest.java:58)
   	at org.apache.activemq.cli.test.CliPerfClientTest.testDurableStarts(CliPerfClientTest.java:68)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
   	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
   	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
   	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
   Caused by: javax.jms.IllegalStateException: Cannot create durable subscription - client ID has not been set
   	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:865)
   	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableConsumer(ActiveMQSession.java:661)
   	at org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableConsumer(ActiveMQSession.java:643)
   	at org.apache.activemq.artemis.cli.commands.messages.perf.MessageListenerBenchmark.start(MessageListenerBenchmark.java:214)
   	... 37 more
   ```



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gtully commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
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.



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gtully commented on a diff in pull request #4154: ARTEMIS-3901 Fix artemis perf client --durable fails on exception

Posted by GitBox <gi...@apache.org>.
gtully commented on code in PR #4154:
URL: https://github.com/apache/activemq-artemis/pull/4154#discussion_r927483547


##########
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:
   this seems odd, maybe durableSubscription boolean needs to be an identity in the form of a string. If the generated uuid is the identity of the subscription, then it won't be possible to access those messages on a second attempt.
   



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org