Skip to content

Commit b3e5d3f

Browse files
committed
[ISSUE #51]adjust the annotation @optional position.
1 parent ccdc84b commit b3e5d3f

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ public interface Consumer extends ServiceLifecycle, Client {
243243
* @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
244244
* @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
245245
*/
246-
Message receive(String queueName,@Optional int partitionId, long receiptId, long timeout);
246+
@Optional
247+
Message receive(String queueName, int partitionId, long receiptId, long timeout);
247248

248249

249250
/**
@@ -273,7 +274,8 @@ public interface Consumer extends ServiceLifecycle, Client {
273274
* @throws OMSTimeOutException when the given timeout elapses before the send operation completes.
274275
* @throws OMSRuntimeException when the {@code Producer} fails to send the message due to some internal error.
275276
*/
276-
List<Message> batchReceive(String queueName,@Optional int partitionId, long receiptId, long timeout);
277+
@Optional
278+
List<Message> batchReceive(String queueName, int partitionId, long receiptId, long timeout);
277279

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

0 commit comments

Comments
 (0)