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

Method Publish

js.go:629–631  ·  view source on GitHub ↗

Publish publishes a message to a stream from JetStream.

(subj string, data []byte, opts ...PubOpt)

Source from the content-addressed store, hash-verified

627
628// Publish publishes a message to a stream from JetStream.
629func (js *js) Publish(subj string, data []byte, opts ...PubOpt) (*PubAck, error) {
630 return js.PublishMsg(&Msg{Subject: subj, Data: data}, opts...)
631}
632
633// PubAckFuture is a future for a PubAck.
634type PubAckFuture interface {

Callers

nothing calls this directly

Calls 1

PublishMsgMethod · 0.95

Tested by

no test coverage detected