Publish publishes the data argument to the given subject. The data argument will be encoded using the associated encoder. Deprecated: Encoded connections are no longer supported.
(subject string, v any)
| 103 | // |
| 104 | // Deprecated: Encoded connections are no longer supported. |
| 105 | func (c *EncodedConn) Publish(subject string, v any) error { |
| 106 | b, err := c.Enc.Encode(subject, v) |
| 107 | if err != nil { |
| 108 | return err |
| 109 | } |
| 110 | return c.Conn.publish(subject, _EMPTY_, false, nil, b) |
| 111 | } |
| 112 | |
| 113 | // PublishRequest will perform a Publish() expecting a response on the |
| 114 | // reply subject. Use Request() for automatically waiting for a response |