MCPcopy
hub / github.com/nats-io/nats.go / MaxPayload

Method MaxPayload

nats.go:6300–6304  ·  view source on GitHub ↗

MaxPayload returns the size limit that a message payload can have. This is set by the server configuration and delivered to the client upon connect.

()

Source from the content-addressed store, hash-verified

6298// This is set by the server configuration and delivered to the client
6299// upon connect.
6300func (nc *Conn) MaxPayload() int64 {
6301 nc.mu.RLock()
6302 defer nc.mu.RUnlock()
6303 return nc.info.MaxPayload
6304}
6305
6306// HeadersSupported will return if the server supports headers
6307func (nc *Conn) HeadersSupported() bool {

Callers 1

TestErrOnMaxPayloadLimitFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestErrOnMaxPayloadLimitFunction · 0.64