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

Method PublishRequest

enc.go:118–124  ·  view source on GitHub ↗

PublishRequest will perform a Publish() expecting a response on the reply subject. Use Request() for automatically waiting for a response inline. Deprecated: Encoded connections are no longer supported.

(subject, reply string, v any)

Source from the content-addressed store, hash-verified

116//
117// Deprecated: Encoded connections are no longer supported.
118func (c *EncodedConn) PublishRequest(subject, reply string, v any) error {
119 b, err := c.Enc.Encode(subject, v)
120 if err != nil {
121 return err
122 }
123 return c.Conn.publish(subject, reply, true, nil, b)
124}
125
126// Request will create an Inbox and perform a Request() call
127// with the Inbox reply for the data v. A response will be

Callers 1

Calls 2

publishMethod · 0.80
EncodeMethod · 0.65

Tested by 1