when we are adding vm listener in our flow with particular queue name, does that means the message is being consumed already? if anything in the listener flow goes wrong, will that message be still there if we have added the queue as persistent?
The message is consumed from the queue by the listener. If the flow is started, the message has been already consumed.
Persistent is related to where the queue is stored before the message is consumed. As I said, if the message is in the flow, it is already removed from the queue. The exception is if you use transactions. Then the message will be consumed when the transaction ends, or not consumed if there is an error.