NextMsgWithContext takes a context and returns the next message available to a synchronous subscriber, blocking until it is delivered or context gets canceled.
(ctx context.Context)
| 165 | // available to a synchronous subscriber, blocking until it is delivered |
| 166 | // or context gets canceled. |
| 167 | func (s *Subscription) NextMsgWithContext(ctx context.Context) (*Msg, error) { |
| 168 | return s.nextMsgWithContext(ctx, false, true) |
| 169 | } |
| 170 | |
| 171 | // FlushWithContext will allow a context to control the duration |
| 172 | // of a Flush() call. This context should be non-nil and should |