FetchNoWait sends a single request to retrieve given number of messages. FetchNoWait will only return messages that are available at the time of the request. It will not wait for more messages to arrive.
(batch int)
| 888 | // FetchNoWait will only return messages that are available at the time of the |
| 889 | // request. It will not wait for more messages to arrive. |
| 890 | func (p *pullConsumer) FetchNoWait(batch int) (MessageBatch, error) { |
| 891 | req := &pullRequest{ |
| 892 | Batch: batch, |
| 893 | NoWait: true, |
| 894 | } |
| 895 | |
| 896 | return p.fetch(req) |
| 897 | } |
| 898 | |
| 899 | func (p *pullConsumer) fetch(req *pullRequest) (MessageBatch, error) { |
| 900 | res := &fetchResult{ |