File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -94,16 +94,11 @@ public function consume(int $timeout = 0): void
9494 $ now = time ();
9595 $ redeliveryDelay = $ this ->getRedeliveryDelay () / 1000 ; // milliseconds to seconds
9696
97- $ currentQueueNames = [];
9897 while (true ) {
99- if (empty ($ currentQueueNames )) {
100- $ currentQueueNames = $ queueNames ;
101- }
102-
10398 $ this ->removeExpiredMessages ();
10499 $ this ->redeliverMessages ();
105100
106- if ($ message = $ this ->fetchMessage ($ currentQueueNames , $ redeliveryDelay )) {
101+ if ($ message = $ this ->fetchMessage ($ queueNames , $ redeliveryDelay )) {
107102 /**
108103 * @var DbalConsumer
109104 * @var callable $callback
@@ -113,11 +108,7 @@ public function consume(int $timeout = 0): void
113108 if (false === call_user_func ($ callback , $ message , $ consumer )) {
114109 return ;
115110 }
116-
117- unset($ currentQueueNames [$ message ->getQueue ()]);
118111 } else {
119- $ currentQueueNames = [];
120-
121112 usleep ($ this ->getPollingInterval () * 1000 );
122113 }
123114
You can’t perform that action at this time.
0 commit comments