Skip to content

Commit d21632e

Browse files
committed
[ISSUE #51]add some parameters(such as,queueName,partitionId,offset) in the batchReceive method.
1 parent 33ee570 commit d21632e

File tree

1 file changed

+4
-1
lines changed
  • openmessaging-api/src/main/java/io/openmessaging/consumer

1 file changed

+4
-1
lines changed

openmessaging-api/src/main/java/io/openmessaging/consumer/Consumer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,16 @@ public interface Consumer extends ServiceLifecycle, Client {
251251
* should implement in the {@link MessageListener}.
252252
* <p>
253253
*
254+
* @param queueName receive message from which queueName in Message Queue.
255+
* @param partitionId receive message from which partition in Message Queue.
256+
* @param offset receive message from which offset in Message Queue.
254257
* @param timeout receive messages will blocked at most <code>timeout</code> milliseconds.
255258
* @return the next batch messages received from the bind queues, or null if the consumer is concurrently shut down.
256259
* @throws OMSSecurityException when have no authority to receive messages from this queue.
257260
* @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
258261
* @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
259262
*/
260-
List<Message> batchReceive(long timeout);
263+
List<Message> batchReceive(String queueName, int partitionId, long offset, long timeout);
261264

262265
/**
263266
* Acknowledges the specified and consumed message with the unique message receipt handle, in the scenario of using

0 commit comments

Comments
 (0)