Class ProducerBenchmark

  • All Implemented Interfaces:
    java.lang.AutoCloseable, BenchmarkService

    public final class ProducerBenchmark
    extends java.lang.Object
    implements BenchmarkService
    • Constructor Summary

      Constructors 
      Constructor Description
      ProducerBenchmark​(javax.jms.ConnectionFactory factory, MicrosTimeProvider timeProvider, io.netty.channel.EventLoopGroup loopGroup, int producers, long messageCount, boolean sharedConnections, java.lang.String group, long ttl, int messageSize, javax.jms.Destination[] destinations, boolean persistent, long maxPending, long transactionCapacity, java.lang.Long messageRate, boolean enableMessageID, boolean enableTimestamp)  
    • Constructor Detail

      • ProducerBenchmark

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

      • expectedTotalMessageCountToReceive

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

        public static long expectedTotalMessageCountToReceive​(java.util.stream.Stream<org.apache.activemq.artemis.api.core.ObjLongPair<javax.jms.Destination>> messageSentPerDestination,
                                                              int sharedSubscriptions,
                                                              int consumersPerDestination)
      • asyncClose

        public java.util.concurrent.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 java.lang.AutoCloseable
        Specified by:
        close in interface BenchmarkService