Skip to content

Commit e6c8fe0

Browse files
committed
Calling AmqpContext::declareQueue() now returns an integer holding the
queue message count
1 parent 226b054 commit e6c8fe0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: pkg/amqp-ext/AmqpContext.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public function deleteQueue(PsrDestination $destination)
114114

115115
/**
116116
* @param AmqpQueue|PsrDestination $destination
117+
*
118+
* @return int
117119
*/
118120
public function declareQueue(PsrDestination $destination)
119121
{
@@ -127,11 +129,13 @@ public function declareQueue(PsrDestination $destination)
127129
$extQueue->setName($destination->getQueueName());
128130
}
129131

130-
$extQueue->declareQueue();
132+
$count = $extQueue->declareQueue();
131133

132134
if (false == $destination->getQueueName()) {
133135
$destination->setQueueName($extQueue->getName());
134136
}
137+
138+
return $count;
135139
}
136140

137141
/**

0 commit comments

Comments
 (0)