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)
| 193 | // |
| 194 | // Deprecated: Encoded connections are no longer supported. |
| 195 | func (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 |