Open kensel opened 5 years ago
Similar to https://github.com/RamblingCookieMonster/PSRabbitMq/issues/23
You should pipe this to a for-each loop and process messages and/or do assignment within that loop.
Hello derekmwright, I tried changing to:
Wait-RabbitMQMessage -Exchange TestFanExc -Key 'TestQueue' -QueueName TestQueue -Timeout 120 @Params -LoopInterval 5 | ForEach-Object { Write-host $_}
#And
Start-RabbitMqListener -Exchange TestFanExc -Key 'TestQueue' -QueueName TestQueue @Params | ForEach-Object { Write-host $_}
But the first one still drains the queue while only outputting one item and the second outputs the number of messages but the same message (28 lines of '::1').
Try to turn on the -RequireAck
flag (it's not optimal, but that's the current solution I have for you).
From the function's docstring:
.PARAMETER RequireAck
If specified, require an ack for messages
Note: Without this, dequeue seems to empty a whole queue?
Hello,
I'm using the module and when I run Wait-RabbitMqMessage it removes all messages but only returns 1 output. Trying to understand if this is the expected behavior as I expected it to be more like the Get-RabbitMQMessage where it would return 1 object per run as Wait-RabbitMqMessage doesn't have the count parameter.
Thank you, Kensel