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

Method Publish

nats.go:4229–4231  ·  view source on GitHub ↗

Publish publishes the data argument to the given subject. The data argument is left untouched and needs to be correctly interpreted on the receiver.

(subj string, data []byte)

Source from the content-addressed store, hash-verified

4227// argument is left untouched and needs to be correctly interpreted on
4228// the receiver.
4229func (nc *Conn) Publish(subj string, data []byte) error {
4230 return nc.publish(subj, _EMPTY_, false, nil, data)
4231}
4232
4233// Header represents the optional Header for a NATS message,
4234// based on the implementation of http.Header.

Callers 4

waitForMsgsMethod · 0.95
processMsgMethod · 0.95
TestNilConnectionFunction · 0.95

Calls 1

publishMethod · 0.95

Tested by 1

TestNilConnectionFunction · 0.76