Interface EmgReceiver
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ServiceBusEmgReceiver
A peek-lock receiver bound to one EMG queue (or topic subscription). This is the seam between
EmgListener and a concrete messaging client; the bundled implementation is
ServiceBusEmgReceiver.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying connection.Receives up tomaxMessages, waiting at mostmaxWaitfor the first one.
-
Method Details
-
receive
Receives up tomaxMessages, waiting at mostmaxWaitfor the first one.- Parameters:
maxMessages- upper bound on the batch size, at least 1maxWait- how long to wait before returning a possibly empty batch- Returns:
- the locked deliveries, possibly empty, never
null
-
close
void close()Closes the underlying connection. Unsettled locks are released by the broker.- Specified by:
closein interfaceAutoCloseable
-