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

Method Subscribe

enc.go:195–197  ·  view source on GitHub ↗

Subscribe will create a subscription on the given subject and process incoming messages using the specified Handler. The Handler should be a func that matches a signature from the description of Handler from above. Deprecated: Encoded connections are no longer supported.

(subject string, cb Handler)

Source from the content-addressed store, hash-verified

193//
194// Deprecated: Encoded connections are no longer supported.
195func (c *EncodedConn) Subscribe(subject string, cb Handler) (*Subscription, error) {
196 return c.subscribe(subject, _EMPTY_, cb)
197}
198
199// QueueSubscribe will create a queue subscription on the given subject and process
200// incoming messages using the specified Handler. The Handler should be a func that

Calls 1

subscribeMethod · 0.95