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

Method PublishAsync

jetstream/publish.go:267–269  ·  view source on GitHub ↗

PublishAsync performs an asynchronous publish to a stream and returns [PubAckFuture] interface. It accepts subject name (which must be bound to a stream) and message payload.

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

Source from the content-addressed store, hash-verified

265// [PubAckFuture] interface. It accepts subject name (which must be bound
266// to a stream) and message payload.
267func (js *jetStream) PublishAsync(subj string, data []byte, opts ...PublishOpt) (PubAckFuture, error) {
268 return js.PublishMsgAsync(&nats.Msg{Subject: subj, Data: data}, opts...)
269}
270
271// PublishMsgAsync performs an asynchronous publish to a stream and
272// returns [PubAckFuture] interface. It accepts subject name (which must

Callers

nothing calls this directly

Calls 1

PublishMsgAsyncMethod · 0.95

Tested by

no test coverage detected