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

Method PublishMsg

jetstream/jetstream.go:79–79  ·  view source on GitHub ↗

PublishMsg performs a synchronous publish to a stream and waits for ack from server. It accepts subject name (which must be bound to a stream) and nats.Message.

(ctx context.Context, msg *nats.Msg, opts ...PublishOpt)

Source from the content-addressed store, hash-verified

77 // ack from server. It accepts subject name (which must be bound to a
78 // stream) and nats.Message.
79 PublishMsg(ctx context.Context, msg *nats.Msg, opts ...PublishOpt) (*PubAck, error)
80
81 // PublishAsync performs a publish to a stream and returns
82 // [PubAckFuture] interface, not blocking while waiting for an

Callers 8

updateRevisionMethod · 0.65
DeleteMethod · 0.65
publishMetaFunction · 0.65
PublishMsgAsyncMethod · 0.65
TestPublishMsgFunction · 0.65
TestGetMsgFunction · 0.65
TestPullConsumerMessagesFunction · 0.65
TestPullConsumerConsumeFunction · 0.65

Implementers 2

jsjs.go
jetStreamjetstream/jetstream.go

Calls

no outgoing calls

Tested by 4

TestPublishMsgFunction · 0.52
TestGetMsgFunction · 0.52
TestPullConsumerMessagesFunction · 0.52
TestPullConsumerConsumeFunction · 0.52