Class ProducerBenchmark

java.lang.Object
org.apache.activemq.artemis.cli.commands.messages.perf.ProducerBenchmark
All Implemented Interfaces:
AutoCloseable, BenchmarkService

public final class ProducerBenchmark extends Object implements BenchmarkService
  • Constructor Details

    • ProducerBenchmark

      public ProducerBenchmark(javax.jms.ConnectionFactory factory, MicrosTimeProvider timeProvider, io.netty.channel.EventLoopGroup loopGroup, int producers, long messageCount, boolean sharedConnections, String group, long ttl, int messageSize, javax.jms.Destination[] destinations, boolean persistent, long maxPending, long transactionCapacity, Long messageRate, boolean enableMessageID, boolean enableTimestamp)
  • Method Details

    • expectedTotalMessageCountToReceive

      public long expectedTotalMessageCountToReceive(int sharedSubscriptions, int consumersPerDestination)
    • expectedTotalMessageCountToReceive

      public static long expectedTotalMessageCountToReceive(Stream<ObjLongPair<javax.jms.Destination>> messageSentPerDestination, int sharedSubscriptions, int consumersPerDestination)
    • getGenerators

      public ProducerLoadGenerator[] getGenerators()
    • anyError

      public boolean anyError()
      Specified by:
      anyError in interface BenchmarkService
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface BenchmarkService
    • start

      public ProducerBenchmark start()
      Specified by:
      start in interface BenchmarkService
    • asyncClose

      public CompletionStage<?> asyncClose()
      After this, now new messages are sent, but there still be some to be completed: the return value can be used to await completions to arrive.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface BenchmarkService