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

Method GetLastMsg

jsm.go:1242–1244  ·  view source on GitHub ↗

GetLastMsg retrieves the last raw stream message stored in JetStream by subject.

(name, subject string, opts ...JSOpt)

Source from the content-addressed store, hash-verified

1240
1241// GetLastMsg retrieves the last raw stream message stored in JetStream by subject.
1242func (js *js) GetLastMsg(name, subject string, opts ...JSOpt) (*RawStreamMsg, error) {
1243 return js.getMsg(name, &apiMsgGetRequest{LastFor: subject}, opts...)
1244}
1245
1246// GetMsg retrieves a raw stream message stored in JetStream by sequence number.
1247func (js *js) GetMsg(name string, seq uint64, opts ...JSOpt) (*RawStreamMsg, error) {

Callers

nothing calls this directly

Calls 1

getMsgMethod · 0.95

Tested by

no test coverage detected