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

Method NewInbox

nats.go:4729–4739  ·  view source on GitHub ↗

Create a new inbox that is prefix aware.

()

Source from the content-addressed store, hash-verified

4727
4728// Create a new inbox that is prefix aware.
4729func (nc *Conn) NewInbox() string {
4730 if nc.Opts.InboxPrefix == _EMPTY_ {
4731 return NewInbox()
4732 }
4733
4734 var sb strings.Builder
4735 sb.WriteString(nc.Opts.InboxPrefix)
4736 sb.WriteByte('.')
4737 sb.WriteString(nuid.Next())
4738 return sb.String()
4739}
4740
4741// Function to init new response structures.
4742func (nc *Conn) initNewResp() {

Callers 15

oldRequestMethod · 0.95
initNewRespMethod · 0.95
oldRequestWithContextMethod · 0.95
subscribeMethod · 0.80
resetOrderedConsumerMethod · 0.80
BenchmarkInboxCreationFunction · 0.80
TestMsg_RespondMsgFunction · 0.80
TestCustomInboxPrefixFunction · 0.80

Calls 3

NewInboxFunction · 0.85
NextMethod · 0.65
StringMethod · 0.45