Subscribe will express interest in the given subject. The subject can have wildcards. There are two type of wildcards: * for partial, and > for full. A subscription on subject time.*.east would receive messages sent to time.us.east and time.eu.east. A subscription on subject time.us.> would receive
(subj string, cb MsgHandler)
| 4795 | // since it can't match more than one token. |
| 4796 | // Messages will be delivered to the associated MsgHandler. |
| 4797 | func (nc *Conn) Subscribe(subj string, cb MsgHandler) (*Subscription, error) { |
| 4798 | return nc.subscribe(subj, _EMPTY_, cb, nil, nil, false, nil) |
| 4799 | } |
| 4800 | |
| 4801 | // ChanSubscribe will express interest in the given subject and place |
| 4802 | // all messages received on the channel. |