Class

com.github.mitallast.nsq.protocol

NSQConfig

Related Doc: package protocol

Permalink

case class NSQConfig(clientId: String, hostname: String, userAgent: String, featureNegotiation: Boolean = true, heartbeatInterval: Option[Int] = None, outputBufferSize: Option[Int] = None, outputBufferTimeout: Option[Long] = None, tlsV1: Option[Boolean] = None, snappy: Option[Boolean] = None, deflate: Option[Boolean] = None, deflateLevel: Option[Int] = None, sampleRate: Option[Int] = None, msgTimeout: Option[Long] = None) extends Product with Serializable

clientId

an identifier used to disambiguate this client (ie. something specific to the consumer)

hostname

the hostname where the client is deployed

userAgent

(nsqd v0.2.25+) a string identifying the agent for this client in the spirit of HTTP Default: <client_library_name>/<version>

featureNegotiation

(nsqd v0.2.19+) bool used to indicate that the client supports feature negotiation. If the server is capable, it will send back a JSON payload of supported features and metadata.

heartbeatInterval

(nsqd v0.2.19+) milliseconds between heartbeats. Valid range: 1000 <= heartbeat_interval <= configured_max (-1 disables heartbeats) --max-heartbeat-interval (nsqd flag) controls the max Defaults to --client-timeout / 2

outputBufferSize

(nsqd v0.2.21+) the size in bytes of the buffer nsqd will use when writing to this client. Valid range: 64 <= output_buffer_size <= configured_max (-1 disables output buffering) --max-output-buffer-size (nsqd flag) controls the max Defaults to 16kb

outputBufferTimeout

(nsqd v0.2.21+) the timeout after which any data that nsqd has buffered will be flushed to this client. Valid range: 1ms <= output_buffer_timeout <= configured_max (-1 disables timeouts) --max-output-buffer-timeout (nsqd flag) controls the max. Defaults to 250ms Warning: configuring clients with an extremely low (< 25ms) output_buffer_timeout has a significant effect on nsqd CPU usage (particularly with > 50 clients connected). This is due to the current implementation relying on Go timers which are maintained by the Go runtime in a priority queue. See the commit message in pull request #236 for more details.

tlsV1

(nsqd v0.2.22+) enable TLS for this connection. --tls-cert and --tls-key (nsqd flags) enable TLS and configure the server certificate If the server supports TLS it will reply "tls_v1": true The client should begin the TLS handshake immediately after reading the IDENTIFY response The server will respond OK after completing the TLS handshake

snappy

snappy (nsqd v0.2.23+) enable snappy compression for this connection. --snappy (nsqd flag) enables support for this server side

deflate

deflate (nsqd v0.2.23+) enable deflate compression for this connection. --deflate (nsqd flag) enables support for this server side The client should expect an additional, deflate compressed OK response immediately after the IDENTIFY response. A client cannot enable both snappy and deflate.

deflateLevel

(nsqd v0.2.23+) configure the deflate compression level for this connection. --max-deflate-level (nsqd flag) configures the maximum allowed value Valid range: 1 <= deflate_level <= configured_max Higher values mean better compression but more CPU usage for nsqd.

sampleRate

(nsqd v0.2.25+) deliver a percentage of all messages received to this connection. Valid range: 0 <= sample_rate <= 99 (0 disables sampling) Defaults to 0

msgTimeout

(nsqd v0.2.28+) configure the server-side message timeout in milliseconds for messages delivered to this client.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NSQConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NSQConfig(clientId: String, hostname: String, userAgent: String, featureNegotiation: Boolean = true, heartbeatInterval: Option[Int] = None, outputBufferSize: Option[Int] = None, outputBufferTimeout: Option[Long] = None, tlsV1: Option[Boolean] = None, snappy: Option[Boolean] = None, deflate: Option[Boolean] = None, deflateLevel: Option[Int] = None, sampleRate: Option[Int] = None, msgTimeout: Option[Long] = None)

    Permalink

    clientId

    an identifier used to disambiguate this client (ie. something specific to the consumer)

    hostname

    the hostname where the client is deployed

    userAgent

    (nsqd v0.2.25+) a string identifying the agent for this client in the spirit of HTTP Default: <client_library_name>/<version>

    featureNegotiation

    (nsqd v0.2.19+) bool used to indicate that the client supports feature negotiation. If the server is capable, it will send back a JSON payload of supported features and metadata.

    heartbeatInterval

    (nsqd v0.2.19+) milliseconds between heartbeats. Valid range: 1000 <= heartbeat_interval <= configured_max (-1 disables heartbeats) --max-heartbeat-interval (nsqd flag) controls the max Defaults to --client-timeout / 2

    outputBufferSize

    (nsqd v0.2.21+) the size in bytes of the buffer nsqd will use when writing to this client. Valid range: 64 <= output_buffer_size <= configured_max (-1 disables output buffering) --max-output-buffer-size (nsqd flag) controls the max Defaults to 16kb

    outputBufferTimeout

    (nsqd v0.2.21+) the timeout after which any data that nsqd has buffered will be flushed to this client. Valid range: 1ms <= output_buffer_timeout <= configured_max (-1 disables timeouts) --max-output-buffer-timeout (nsqd flag) controls the max. Defaults to 250ms Warning: configuring clients with an extremely low (< 25ms) output_buffer_timeout has a significant effect on nsqd CPU usage (particularly with > 50 clients connected). This is due to the current implementation relying on Go timers which are maintained by the Go runtime in a priority queue. See the commit message in pull request #236 for more details.

    tlsV1

    (nsqd v0.2.22+) enable TLS for this connection. --tls-cert and --tls-key (nsqd flags) enable TLS and configure the server certificate If the server supports TLS it will reply "tls_v1": true The client should begin the TLS handshake immediately after reading the IDENTIFY response The server will respond OK after completing the TLS handshake

    snappy

    snappy (nsqd v0.2.23+) enable snappy compression for this connection. --snappy (nsqd flag) enables support for this server side

    deflate

    deflate (nsqd v0.2.23+) enable deflate compression for this connection. --deflate (nsqd flag) enables support for this server side The client should expect an additional, deflate compressed OK response immediately after the IDENTIFY response. A client cannot enable both snappy and deflate.

    deflateLevel

    (nsqd v0.2.23+) configure the deflate compression level for this connection. --max-deflate-level (nsqd flag) configures the maximum allowed value Valid range: 1 <= deflate_level <= configured_max Higher values mean better compression but more CPU usage for nsqd.

    sampleRate

    (nsqd v0.2.25+) deliver a percentage of all messages received to this connection. Valid range: 0 <= sample_rate <= 99 (0 disables sampling) Defaults to 0

    msgTimeout

    (nsqd v0.2.28+) configure the server-side message timeout in milliseconds for messages delivered to this client.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asJson(out: ByteBuf): ByteBuf

    Permalink
  6. val clientId: String

    Permalink

    an identifier used to disambiguate this client (ie.

    an identifier used to disambiguate this client (ie. something specific to the consumer)

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val deflate: Option[Boolean]

    Permalink

    deflate (nsqd v0.2.23+) enable deflate compression for this connection.

    deflate (nsqd v0.2.23+) enable deflate compression for this connection. --deflate (nsqd flag) enables support for this server side The client should expect an additional, deflate compressed OK response immediately after the IDENTIFY response. A client cannot enable both snappy and deflate.

  9. val deflateLevel: Option[Int]

    Permalink

    (nsqd v0.2.23+) configure the deflate compression level for this connection.

    (nsqd v0.2.23+) configure the deflate compression level for this connection. --max-deflate-level (nsqd flag) configures the maximum allowed value Valid range: 1 <= deflate_level <= configured_max Higher values mean better compression but more CPU usage for nsqd.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. val featureNegotiation: Boolean

    Permalink

    (nsqd v0.2.19+) bool used to indicate that the client supports feature negotiation.

    (nsqd v0.2.19+) bool used to indicate that the client supports feature negotiation. If the server is capable, it will send back a JSON payload of supported features and metadata.

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. val heartbeatInterval: Option[Int]

    Permalink

    (nsqd v0.2.19+) milliseconds between heartbeats.

    (nsqd v0.2.19+) milliseconds between heartbeats. Valid range: 1000 <= heartbeat_interval <= configured_max (-1 disables heartbeats) --max-heartbeat-interval (nsqd flag) controls the max Defaults to --client-timeout / 2

  15. val hostname: String

    Permalink

    the hostname where the client is deployed

  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val msgTimeout: Option[Long]

    Permalink

    (nsqd v0.2.28+) configure the server-side message timeout in milliseconds for messages delivered to this client.

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val outputBufferSize: Option[Int]

    Permalink

    (nsqd v0.2.21+) the size in bytes of the buffer nsqd will use when writing to this client.

    (nsqd v0.2.21+) the size in bytes of the buffer nsqd will use when writing to this client. Valid range: 64 <= output_buffer_size <= configured_max (-1 disables output buffering) --max-output-buffer-size (nsqd flag) controls the max Defaults to 16kb

  22. val outputBufferTimeout: Option[Long]

    Permalink

    (nsqd v0.2.21+) the timeout after which any data that nsqd has buffered will be flushed to this client.

    (nsqd v0.2.21+) the timeout after which any data that nsqd has buffered will be flushed to this client. Valid range: 1ms <= output_buffer_timeout <= configured_max (-1 disables timeouts) --max-output-buffer-timeout (nsqd flag) controls the max. Defaults to 250ms Warning: configuring clients with an extremely low (< 25ms) output_buffer_timeout has a significant effect on nsqd CPU usage (particularly with > 50 clients connected). This is due to the current implementation relying on Go timers which are maintained by the Go runtime in a priority queue. See the commit message in pull request #236 for more details.

  23. val sampleRate: Option[Int]

    Permalink

    (nsqd v0.2.25+) deliver a percentage of all messages received to this connection.

    (nsqd v0.2.25+) deliver a percentage of all messages received to this connection. Valid range: 0 <= sample_rate <= 99 (0 disables sampling) Defaults to 0

  24. val snappy: Option[Boolean]

    Permalink

    snappy (nsqd v0.2.23+) enable snappy compression for this connection.

    snappy (nsqd v0.2.23+) enable snappy compression for this connection. --snappy (nsqd flag) enables support for this server side

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. val tlsV1: Option[Boolean]

    Permalink

    (nsqd v0.2.22+) enable TLS for this connection.

    (nsqd v0.2.22+) enable TLS for this connection. --tls-cert and --tls-key (nsqd flags) enable TLS and configure the server certificate If the server supports TLS it will reply "tls_v1": true The client should begin the TLS handshake immediately after reading the IDENTIFY response The server will respond OK after completing the TLS handshake

  27. val userAgent: String

    Permalink

    (nsqd v0.2.25+) a string identifying the agent for this client in the spirit of HTTP Default: <client_library_name>/<version>

  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped