Package

com.logimethods.nats.connector

gatling

Permalink

package gatling

Visibility
  1. Public
  2. All

Type Members

  1. case class NatsBuilder(messageProvider: AnyRef) extends ActionBuilder with Product with Serializable

    Permalink

    A Gatling ActionBuilder to inject messages into NATS.

    A Gatling ActionBuilder to inject messages into NATS.

    Possible usage:

    val natsScn = scenario("NATS call").exec(NatsBuilder(new ValueProvider()))
    class ValueProvider {
      val incr = 10
      val basedValue = 100 -incr
      val maxIncr = 50
      var actualIncr = 0
    
      override def toString(): String = {
        actualIncr = (actualIncr % (maxIncr + incr)) + incr
        (basedValue + actualIncr).toString()
      }
    }
    messageProvider

    the provider of the messages to emit. The actual message will be the output of the toString() method applied to this object (which could be a simple String if the message doesn't have to change over time).

    See also

    Write a Custom Protocol for Gatling

  2. case class NatsProtocol(properties: Properties, subject: String) extends Protocol with Product with Serializable

    Permalink

    A Gatling Protocol to inject messages into NATS.

    A Gatling Protocol to inject messages into NATS.

    properties

    defining the parameters of NATS server to connect to. This connection is provided by a new ConnectionFactory(properties)

    subject

    the subject on which the messages will be pushed to NATS

    See also

    ConnectionFactory API

    ConnectionFactory.java

    Write a Custom Protocol for Gatling

Ungrouped