Record Class ScenarioFile.ProducerJson

java.lang.Object
java.lang.Record
org.acemq.workloads.scenario.ScenarioFile.ProducerJson
Record Components:
name - what to call this source of load
exchange - where it publishes
routingKeys - the keys it publishes under, in turn
rate - messages a second, 0 for as fast as it can
threads - how many threads, or null to work it out from the rate
messageSize - bytes per message
confirms - whether it waits for the broker
maxInFlight - how many publishes may be outstanding
maxMessages - stop after this many
enabled - whether it publishes
Enclosing class:
ScenarioFile

public static record ScenarioFile.ProducerJson(String name, String exchange, List<String> routingKeys, Long rate, Integer threads, Integer messageSize, Boolean confirms, Integer maxInFlight, Long maxMessages, Boolean enabled, ScenarioFile.ExpectJson expect) extends Record
  • Constructor Details

    • ProducerJson

      public ProducerJson(String name, String exchange, List<String> routingKeys, Long rate, Integer threads, Integer messageSize, Boolean confirms, Integer maxInFlight, Long maxMessages, Boolean enabled)
      A producer that is asked to prove nothing in particular.
    • ProducerJson

      public ProducerJson(String name, String exchange, List<String> routingKeys, Long rate, Integer threads, Integer messageSize, Boolean confirms, Integer maxInFlight, Long maxMessages, Boolean enabled, ScenarioFile.ExpectJson expect)
      Creates an instance of a ProducerJson record class.
      Parameters:
      name - the value for the name record component
      exchange - the value for the exchange record component
      routingKeys - the value for the routingKeys record component
      rate - the value for the rate record component
      threads - the value for the threads record component
      messageSize - the value for the messageSize record component
      confirms - the value for the confirms record component
      maxInFlight - the value for the maxInFlight record component
      maxMessages - the value for the maxMessages record component
      enabled - the value for the enabled record component
      expect - the value for the expect record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • exchange

      public String exchange()
      Returns the value of the exchange record component.
      Returns:
      the value of the exchange record component
    • routingKeys

      public List<String> routingKeys()
      Returns the value of the routingKeys record component.
      Returns:
      the value of the routingKeys record component
    • rate

      public Long rate()
      Returns the value of the rate record component.
      Returns:
      the value of the rate record component
    • threads

      public Integer threads()
      Returns the value of the threads record component.
      Returns:
      the value of the threads record component
    • messageSize

      public Integer messageSize()
      Returns the value of the messageSize record component.
      Returns:
      the value of the messageSize record component
    • confirms

      public Boolean confirms()
      Returns the value of the confirms record component.
      Returns:
      the value of the confirms record component
    • maxInFlight

      public Integer maxInFlight()
      Returns the value of the maxInFlight record component.
      Returns:
      the value of the maxInFlight record component
    • maxMessages

      public Long maxMessages()
      Returns the value of the maxMessages record component.
      Returns:
      the value of the maxMessages record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • expect

      public ScenarioFile.ExpectJson expect()
      Returns the value of the expect record component.
      Returns:
      the value of the expect record component