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

Method GetLastMsg

jsm.go:63–63  ·  view source on GitHub ↗

GetLastMsg retrieves the last raw stream message stored in JetStream by subject. Use option nats.DirectGet() to trigger retrieval directly from a distributed group of servers (leader and replicas). The stream must have been created/updated with the AllowDirect boolean.

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

Source from the content-addressed store, hash-verified

61 // directly from a distributed group of servers (leader and replicas).
62 // The stream must have been created/updated with the AllowDirect boolean.
63 GetLastMsg(name, subject string, opts ...JSOpt) (*RawStreamMsg, error)
64
65 // DeleteMsg deletes a message from a stream. The message is marked as erased, but its value is not overwritten.
66 DeleteMsg(name string, seq uint64, opts ...JSOpt) error

Callers 5

getMethod · 0.65
GetInfoMethod · 0.65
WatchMethod · 0.65

Implementers 1

jsjs.go

Calls

no outgoing calls

Tested by 2