Al of a sudden you have figured out there are thousands of messages are queued up on your Edge server and you have identified all these messages are spam etc.
you need to delete all mails within the queue folder as quick as possible
On the Edge Server Stop Transport Service
|Get-Service MsExc* |FL|
once this is done drill down to this directory
Select everything and delete them
Once you re-start the transport service , the required files will be put in there and all queues will be cleared out
This is quick and dirty way of dealing with un-wanted mails if there are mails in the queues which you have business purpose you can be more sophisticated with this PS command