Skip to content

Commit 5521707

Browse files
author
Bogdan Rancichi
committed
refactored the meaning of a batch consumer it now accepts an array of messages and it can return for each message the response ot ack/nack/requeue/reject or 1 single response applied for all.
1 parent 8ee3028 commit 5521707

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

RabbitMq/BatchConsumerInterface.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
namespace OldSound\RabbitMqBundle\RabbitMq;
44

5-
interface BatchConsumerInterface extends ConsumerInterface
5+
use PhpAmqpLib\Message\AMQPMessage;
6+
7+
interface BatchConsumerInterface
68
{
7-
public function batchExecute();
8-
}
9+
/**
10+
* @param AMQPMessage[] $messages
11+
*
12+
* @return array|bool
13+
*/
14+
public function batchExecute(array $messages);
15+
}

0 commit comments

Comments
 (0)