QueueSubscribe creates a queue subscription. Within the same queue group, only one subscriber receives each message (load-balanced).
(subject, queue string, handler func([]byte))
| 168 | // QueueSubscribe creates a queue subscription. Within the same queue group, |
| 169 | // only one subscriber receives each message (load-balanced). |
| 170 | func (c *Client) QueueSubscribe(subject, queue string, handler func([]byte)) (Subscription, error) { |
| 171 | return c.confirmSubscription(subject, func(conn *nats.Conn) (*nats.Subscription, error) { |
| 172 | return conn.QueueSubscribe(subject, queue, func(msg *nats.Msg) { |
| 173 | handler(msg.Data) |
| 174 | }) |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | // confirmSubscription creates a subscription via mk and forces a server |
| 179 | // round-trip so that a permissions violation — which NATS otherwise reports |
nothing calls this directly
no test coverage detected