What is held in the TransportRoles\data\Queue?

SeekingTruth 191 Reputation points
2021-03-25T01:08:18.68+00:00

I have several questions about the "\Microsoft\Exchange Server\V15\TransportRoles\data\Queue"\mail.que" file.

  1. Why does it get so large?
  2. What is stored in this queue and is there a way to view the contents? How?
  3. Is the data in there still valuable?

I would have thought it to be a transient queue and hence grow and shrink automatically.

I haven't been able to use Powershell or the Mailbox Tool to see what is in the queue unfortunately.

Can you please point me in the right direction on where the data in there is needed.

Thanks

Exchange | Hybrid management
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yuki Sun-MSFT 41,376 Reputation points Moderator
    2021-03-25T08:52:02.147+00:00

    Hi @SeekingTruth ,

    As regards to your questions, hopefully you can find the information below helpful:

    1. Why does it get so large?

    Mail.que is an ESE database with circular logging, hence it won't shrink automatically when items are deleted from mail.que. This database will grow with normal mail flow and if you have busy server, it's common that the mail.que file will grow rapidly to a quite large size.

    1. What is stored in this queue and is there a way to view the contents? How?*

    According to this official blog, broadly, your mail.que consists of following elements:

    • The current day’s message traffic, along with messages which exist on disk longer than normal expiration settings (like poison queue, Journal messages etc.)
    • Shadow redundancy queuing
    • Submission queue and messages waiting for delivery
    • Messages persisted in Safety Net in case they are required for re-delivery

    Regarding to your concern about how to view the contents inside mail.que, to the best of my knowledge, I'm afraid it's not feasible to read data inside a database directly.

    1. Is the data in there still valuable?*

    If mail flow works fine in your environment, you can go ahead deleting the mail.que using the steps below:

    1.Run the following command and make a note of the count of messages in the queue:

    Get-Queue  
    

    2.Pause the "Microsoft Exchange Transport" service via services.msc or the powershell command below:

     suspend-service -name "Microsoft Exchange Transport"  
    

    3.Run the command below again to make sure that the queues are empty:

    Get-Queue  
    

    4.Stop the "Microsoft Exchange Transport" service:

    stop-service -name "Microsoft Exchange Transport"  
    

    5.Rename mail.que file (ie. mail.que.old).
    6.Start Microsoft Exchange Transport.

    start-service -name "Microsoft Exchange Transport"  
    

    7.Run the command below to make sure queues & mail flow are working as expected.

    Get-Queue  
    

    8.Delete mail.que.old file.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.