File tree Expand file tree Collapse file tree
openmessaging-api/src/main/java/io/openmessaging/consumer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -245,6 +245,18 @@ public interface Consumer extends ServiceLifecycle, Client {
245245 Message receive (String queueName , int partitionId , long offset , long timeout );
246246
247247
248+ /**
249+ * Receive message in asynchronous way. This call doesn't block user's thread, and user's message resolve logic
250+ * should implement in the {@link MessageListener}.
251+ * <p>
252+ *
253+ * @param timeout receive messages will blocked at most <code>timeout</code> milliseconds.
254+ * @return the next batch messages received from the bind queues, or null if the consumer is concurrently shut down.
255+ * @throws OMSSecurityException when have no authority to receive messages from this queue.
256+ * @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
257+ * @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
258+ */
259+ List <Message > batchReceive (long timeout );
248260
249261 /**
250262 * Receive message in asynchronous way. This call doesn't block user's thread, and user's message resolve logic
You can’t perform that action at this time.
0 commit comments