Share via


MessageQueue 建構函式

定義

初始化 MessageQueue 類別的新執行個體。

多載

MessageQueue()

初始化 MessageQueue 類別的新執行個體。 在無參數建構函式初始化新執行個體之後,您必須先設定執行個體的 Path 屬性,才能夠使用執行個體。

MessageQueue(String)

初始化 MessageQueue 類別的新執行個體,這個執行個體會參考指定路徑的訊息佇列。

MessageQueue(String, Boolean)

初始化 MessageQueue 類別的新執行個體,這個執行個體會參考指定路徑且具有指定讀取權限制的訊息佇列。

MessageQueue(String, QueueAccessMode)

初始化 MessageQueue 類別的新執行個體。

MessageQueue(String, Boolean, Boolean)

初始化 MessageQueue 類別的新執行個體。

MessageQueue(String, Boolean, Boolean, QueueAccessMode)

初始化 MessageQueue 類別的新執行個體。

MessageQueue()

初始化 MessageQueue 類別的新執行個體。 在無參數建構函式初始化新執行個體之後,您必須先設定執行個體的 Path 屬性,才能夠使用執行個體。

public:
 MessageQueue();
public MessageQueue ();
Public Sub New ()

範例

下列程式代碼範例會建立新的 MessageQueue

// Connect to a queue on the local computer. You must set the queue's
// Path property before you can use the queue.
MessageQueue queue = new MessageQueue();
queue.Path = ".\\exampleQueue";

備註

使用此多載來建立類別的新實例,該實例 MessageQueue 不會立即系結至消息佇列伺服器上的佇列。 使用此實例之前,您必須藉由設定 Path 屬性,將它連接到現有的消息佇列佇列。 或者,您可以設定 MessageQueue 方法傳回值的參考 Create(String) ,藉此建立新的消息佇列佇列。

MessageQueue 構函式會具現化 類別的新實例 MessageQueue ;它不會建立新的消息佇列佇列。

下表顯示 實例 MessageQueue的初始屬性值。

屬性 初始值
DefaultPropertiesToSend 類別的 DefaultPropertiesToSend 無參數建構函式所設定的值。
Formatter XmlMessageFormatter
MessageReadPropertyFilter 類別的 MessagePropertyFilter 無參數建構函式所設定的值。 所有篩選值都會設定為 true
DenySharedReceive false

另請參閱

適用於

MessageQueue(String)

初始化 MessageQueue 類別的新執行個體,這個執行個體會參考指定路徑的訊息佇列。

public:
 MessageQueue(System::String ^ path);
public MessageQueue (string path);
new System.Messaging.MessageQueue : string -> System.Messaging.MessageQueue
Public Sub New (path As String)

參數

path
String

這個 MessageQueue 所參考的佇列位置。

例外狀況

Path 屬性無效,可能是因為尚未對其進行設定。

範例

下列程式代碼範例會使用各種路徑名稱語法類型來建立新的 MessageQueue 物件。 在每個案例中,它會將訊息傳送至在建構函式中定義其路徑的佇列。

#using <system.dll>
#using <system.messaging.dll>

using namespace System;
using namespace System::Messaging;
ref class MyNewQueue
{
public:

   // References public queues.
   void SendPublic()
   {
      MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue" );
      myQueue->Send( "Public queue by path name." );
      return;
   }


   // References private queues.
   void SendPrivate()
   {
      MessageQueue^ myQueue = gcnew MessageQueue( ".\\Private$\\myQueue" );
      myQueue->Send( "Private queue by path name." );
      return;
   }


   // References queues by label.
   void SendByLabel()
   {
      MessageQueue^ myQueue = gcnew MessageQueue( "Label:TheLabel" );
      myQueue->Send( "Queue by label." );
      return;
   }


   // References queues by format name.
   void SendByFormatName()
   {
      MessageQueue^ myQueue = gcnew MessageQueue( "FormatName:Public=5A5F7535-AE9A-41d4 -935C-845C2AFF7112" );
      myQueue->Send( "Queue by format name." );
      return;
   }


   // References computer journal queues.
   void MonitorComputerJournal()
   {
      MessageQueue^ computerJournal = gcnew MessageQueue( ".\\Journal$" );
      while ( true )
      {
         Message^ journalMessage = computerJournal->Receive();
         
         // Process the journal message.
      }
   }


   // References queue journal queues.
   void MonitorQueueJournal()
   {
      MessageQueue^ queueJournal = gcnew MessageQueue( ".\\myQueue\\Journal$" );
      while ( true )
      {
         Message^ journalMessage = queueJournal->Receive();
         
         // Process the journal message.
      }
   }


   // References dead-letter queues.
   void MonitorDeadLetter()
   {
      MessageQueue^ deadLetter = gcnew MessageQueue( ".\\DeadLetter$" );
      while ( true )
      {
         Message^ deadMessage = deadLetter->Receive();
         
         // Process the dead-letter message.
      }
   }


   // References transactional dead-letter queues.
   void MonitorTransactionalDeadLetter()
   {
      MessageQueue^ TxDeadLetter = gcnew MessageQueue( ".\\XactDeadLetter$" );
      while ( true )
      {
         Message^ txDeadLetter = TxDeadLetter->Receive();
         
         // Process the transactional dead-letter message.
      }
   }

};


//*************************************************
// Provides an entry point into the application.
//         
// This example demonstrates several ways to set
// a queue's path.
//*************************************************
int main()
{
   
   // Create a new instance of the class.
   MyNewQueue^ myNewQueue = gcnew MyNewQueue;
   myNewQueue->SendPublic();
   myNewQueue->SendPrivate();
   myNewQueue->SendByLabel();
   myNewQueue->SendByFormatName();
   myNewQueue->MonitorComputerJournal();
   myNewQueue->MonitorQueueJournal();
   myNewQueue->MonitorDeadLetter();
   myNewQueue->MonitorTransactionalDeadLetter();
   return 0;
}
using System;
using System.Messaging;

namespace MyProject
{
    /// <summary>
    /// Provides a container class for the example.
    /// </summary>
    public class MyNewQueue
    {

        //**************************************************
        // Provides an entry point into the application.
        //		
        // This example demonstrates several ways to set
        // a queue's path.
        //**************************************************

        public static void Main()
        {
            // Create a new instance of the class.
            MyNewQueue myNewQueue = new MyNewQueue();

            myNewQueue.SendPublic();
            myNewQueue.SendPrivate();
            myNewQueue.SendByLabel();
            myNewQueue.SendByFormatName();
            myNewQueue.MonitorComputerJournal();
            myNewQueue.MonitorQueueJournal();
            myNewQueue.MonitorDeadLetter();
            myNewQueue.MonitorTransactionalDeadLetter();

            return;
        }
        
        // References public queues.
        public void SendPublic()
        {
            MessageQueue myQueue = new MessageQueue(".\\myQueue");
            myQueue.Send("Public queue by path name.");

            return;
        }

        // References private queues.
        public void SendPrivate()
        {
            MessageQueue myQueue = new
                MessageQueue(".\\Private$\\myQueue");
            myQueue.Send("Private queue by path name.");

            return;
        }

        // References queues by label.
        public void SendByLabel()
        {
            MessageQueue myQueue = new MessageQueue("Label:TheLabel");
            myQueue.Send("Queue by label.");

            return;
        }

        // References queues by format name.
        public void SendByFormatName()
        {
            MessageQueue myQueue = new
                MessageQueue("FormatName:Public=5A5F7535-AE9A-41d4" +
                "-935C-845C2AFF7112");
            myQueue.Send("Queue by format name.");

            return;
        }

        // References computer journal queues.
        public void MonitorComputerJournal()
        {
            MessageQueue computerJournal = new
                MessageQueue(".\\Journal$");
            while(true)
            {
                Message journalMessage = computerJournal.Receive();
                // Process the journal message.
            }
        }

        // References queue journal queues.
        public void MonitorQueueJournal()
        {
            MessageQueue queueJournal = new
                MessageQueue(".\\myQueue\\Journal$");
            while(true)
            {
                Message journalMessage = queueJournal.Receive();
                // Process the journal message.
            }
        }
        
        // References dead-letter queues.
        public void MonitorDeadLetter()
        {
            MessageQueue deadLetter = new
                MessageQueue(".\\DeadLetter$");
            while(true)
            {
                Message deadMessage = deadLetter.Receive();
                // Process the dead-letter message.
            }
        }

        // References transactional dead-letter queues.
        public void MonitorTransactionalDeadLetter()
        {
            MessageQueue TxDeadLetter = new
                MessageQueue(".\\XactDeadLetter$");
            while(true)
            {
                Message txDeadLetter = TxDeadLetter.Receive();
                // Process the transactional dead-letter message.
            }
        }
    }
}
Imports System.Messaging

Public Class MyNewQueue


        
        ' Provides an entry point into the application.
        '		 
        ' This example demonstrates several ways to set
        ' a queue's path.
        

        Public Shared Sub Main()

            ' Create a new instance of the class.
            Dim myNewQueue As New MyNewQueue()

            myNewQueue.SendPublic()
            myNewQueue.SendPrivate()
            myNewQueue.SendByLabel()
            myNewQueue.SendByFormatName()
            myNewQueue.MonitorComputerJournal()
            myNewQueue.MonitorQueueJournal()
            myNewQueue.MonitorDeadLetter()
            myNewQueue.MonitorTransactionalDeadLetter()

            Return

        End Sub


        ' References public queues.
        Public Sub SendPublic()

            Dim myQueue As New MessageQueue(".\myQueue")
            myQueue.Send("Public queue by path name.")

            Return

        End Sub


        ' References private queues.
        Public Sub SendPrivate()

            Dim myQueue As New MessageQueue(".\Private$\myQueue")
            myQueue.Send("Private queue by path name.")

            Return

        End Sub


        ' References queues by label.
        Public Sub SendByLabel()

            Dim myQueue As New MessageQueue("Label:TheLabel")
            myQueue.Send("Queue by label.")

            Return

        End Sub


        ' References queues by format name.
        Public Sub SendByFormatName()

            Dim myQueue As New _
                MessageQueue("FormatName:Public=" + _
                    "5A5F7535-AE9A-41d4-935C-845C2AFF7112")
            myQueue.Send("Queue by format name.")

            Return

        End Sub


        ' References computer journal queues.
        Public Sub MonitorComputerJournal()

            Dim computerJournal As New MessageQueue(".\Journal$")

            While True

                Dim journalMessage As Message = _
                    computerJournal.Receive()

                ' Process the journal message.

            End While

            Return
        End Sub


        ' References queue journal queues.
        Public Sub MonitorQueueJournal()

            Dim queueJournal As New _
                            MessageQueue(".\myQueue\Journal$")

            While True

                Dim journalMessage As Message = _
                    queueJournal.Receive()

                ' Process the journal message.

            End While

            Return
        End Sub


        ' References dead-letter queues.
        Public Sub MonitorDeadLetter()
            Dim deadLetter As New MessageQueue(".\DeadLetter$")

            While True

                Dim deadMessage As Message = deadLetter.Receive()

                ' Process the dead-letter message.

            End While

            Return

        End Sub


        ' References transactional dead-letter queues.
        Public Sub MonitorTransactionalDeadLetter()

            Dim TxDeadLetter As New MessageQueue(".\XactDeadLetter$")

            While True

                Dim txDeadLetterMessage As Message = _
                    TxDeadLetter.Receive()

                ' Process the transactional dead-letter message.

            End While

            Return

        End Sub

End Class

備註

當您想要將新 MessageQueue 實例系結至特定消息佇列時,請使用此多載,您知道路徑、格式名稱或標籤。 如果您想要將獨佔存取權授與參考佇列的第一個應用程式,您必須將 DenySharedReceive 屬性設定為 true ,或使用傳遞讀取許可權限制參數的建構函式。

MessageQueue 構函式會具現化 類別的新實例 MessageQueue ;它不會建立新的消息佇列佇列。 若要在消息佇列中建立新的佇列,請使用 Create(String)

參數的 path 語法取決於它參考的佇列類型,如下表所示。

佇列類型 語法
公用佇列 MachineName\QueueName
私用佇列 MachineName\Private$\QueueName
記錄檔佇列 MachineName\QueueName\Journal$
計算機日誌佇列 MachineName\Journal$
計算機寄不出的信件佇列 MachineName\Deadletter$
計算機交易式寄不出的信件佇列 MachineName\XactDeadletter$

或者,您可以使用 FormatNameLabel 來描述佇列路徑,如下表所示。

參考 語法 範例
格式名稱 FormatName:格式名稱 ] FormatName:Public= 5A5F7535-AE9A-41d4-935C-845C2AFF7112

FormatName:DIRECT=SPX:NetworkNumber; HostNumber\QueueName

FormatName:DIRECT=TCP: IPAddress\QueueName

FormatName:DIRECT=OS: MachineName\QueueName
標籤 Label: [ 標籤 ] Label: TheLabel

若要離線運作,您必須使用格式名稱語法,而不是建構函式的路徑名稱語法。 否則會擲回例外狀況,因為主要域控制器無法解析格式名稱的路徑。

下表顯示 實例 MessageQueue的初始屬性值。 這些值是以消息佇列佇列的屬性為基礎,其中包含 參數所 path 指定的路徑。

屬性 初始值
Authenticate false
BasePriority 0
Category Empty
DefaultPropertiesToSend 類別的 DefaultPropertiesToSend 無參數建構函式所設定的值。
EncryptionRequired true,如果消息佇列佇列的隱私權等級設定為 “Body”;否則為 false
Formatter XmlMessageFormatter
Label Empty
MachineName 消息佇列佇列的計算機名稱屬性的值。
MaximumJournalSize InfiniteQueueSize
MaximumQueueSize InfiniteQueueSize
MessageReadPropertyFilter 類別的 MessagePropertyFilter 無參數建構函式所設定的值。
Path Empty如果建構函式未設定,則為 。
QueueName Empty如果建構函式未設定,則為 。
DenySharedReceive false
UseJournalQueue true如果已啟用消息佇列物件的日誌設定,則為 ;否則為 false

另請參閱

適用於

MessageQueue(String, Boolean)

初始化 MessageQueue 類別的新執行個體,這個執行個體會參考指定路徑且具有指定讀取權限制的訊息佇列。

public:
 MessageQueue(System::String ^ path, bool sharedModeDenyReceive);
public MessageQueue (string path, bool sharedModeDenyReceive);
new System.Messaging.MessageQueue : string * bool -> System.Messaging.MessageQueue
Public Sub New (path As String, sharedModeDenyReceive As Boolean)

參數

path
String

這個 MessageQueue 參考的佇列位置,可能是代表本機電腦的 "."。

sharedModeDenyReceive
Boolean

true 表示將獨佔讀取的存取權限授與存取佇列的第一個應用程式,否則為 false

例外狀況

Path 屬性無效,可能是因為尚未對其進行設定。

範例

下列程式代碼範例會建立具有獨佔存取權的新 MessageQueue 、設定其路徑,並將訊息傳送至佇列。

#using <system.dll>
#using <system.messaging.dll>

using namespace System;
using namespace System::Messaging;
ref class MyNewQueue
{
public:

   // Requests exlusive read access to the queue. If
   // access is granted, receives a message from the 
   // queue.
   void GetExclusiveAccess()
   {
      try
      {
         
         // Request exclusive read access to the queue.
         MessageQueue^ myQueue = gcnew MessageQueue( ".\\myQueue",true );
         
         // Receive a message. This is where SharingViolation 
         // exceptions would be thrown.
         Message^ myMessage = myQueue->Receive();
      }
      catch ( MessageQueueException^ e ) 
      {
         
         // Handle request for denial of exclusive read access.
         if ( e->MessageQueueErrorCode == MessageQueueErrorCode::SharingViolation )
         {
            Console::WriteLine( "Denied exclusive read access" );
         }

         
         // Handle other sources of a MessageQueueException.
      }

      
      // Handle other exceptions as necessary.
      return;
   }

};


// Provides an entry point into the application.
// This example connects to a message queue, and
// requests exclusive read access to the queue.
int main()
{
   
   // Create a new instance of the class.
   MyNewQueue^ myNewQueue = gcnew MyNewQueue;
   
   // Output the count of Lowest priority messages.
   myNewQueue->GetExclusiveAccess();
   return 0;
}
using System;
using System.Messaging;

namespace MyProject
{
    /// <summary>
    /// Provides a container class for the example.
    /// </summary>
    public class MyNewQueue
    {
        //**************************************************
        // Provides an entry point into the application.
        //		
        // This example connects to a message queue, and
        // requests exclusive read access to the queue.
        //**************************************************

        public static void Main()
        {
            // Create a new instance of the class.
            MyNewQueue myNewQueue = new MyNewQueue();

            // Output the count of Lowest priority messages.
            GetExclusiveAccess();
                        
            return;
        }

        //**************************************************
        // Requests exlusive read access to the queue. If
        // access is granted, receives a message from the
        // queue.
        //**************************************************
        
        public static void GetExclusiveAccess()
        {
            try
            {
                // Request exclusive read access to the queue.
                MessageQueue myQueue = new
                    MessageQueue(".\\myQueue", true);

                // Receive a message. This is where SharingViolation
                // exceptions would be thrown.
                Message myMessage = myQueue.Receive();
            }
            
            catch (MessageQueueException e)
            {
                // Handle request for denial of exclusive read access.
                if (e.MessageQueueErrorCode ==
                    MessageQueueErrorCode.SharingViolation)
                {
                    Console.WriteLine("Denied exclusive read access");
                }

                // Handle other sources of a MessageQueueException.
            }

            // Handle other exceptions as necessary.

            return;
        }
    }
}
Imports System.Messaging

Public Class MyNewQueue


        ' Provides an entry point into the application.
        '		 
        ' This example connects to a message queue, and
        ' requests exclusive read access to the queue.
 

        Public Shared Sub Main()

            ' Create a new instance of the class.
            Dim myNewQueue As New MyNewQueue()

            ' Output the count of Lowest priority messages.
            myNewQueue.GetExclusiveAccess()

            Return

        End Sub


  
        ' Requests exlusive read access to the queue. If
        ' access is granted, receives a message from the 
        ' queue.
  

        Public Sub GetExclusiveAccess()

            Try

                ' Request exclusive read access to the queue.
                Dim myQueue As New MessageQueue(".\myQueue", True)

                ' Receive a message. This is where a SharingViolation 
                ' exception would be thrown.
                Dim myMessage As Message = myQueue.Receive()

            Catch e As MessageQueueException

                ' Handle request for denial of exclusive read access.
                If e.MessageQueueErrorCode = _
                    MessageQueueErrorCode.SharingViolation Then

                    Console.WriteLine("Denied exclusive read access.")

                End If

                ' Handle other sources of a MessageQueueException.

                ' Handle other exceptions as necessary.

            End Try

            Return

        End Sub

End Class

備註

當您想要將新的 MessageQueue 系結至特定消息佇列佇列時,請使用此多載,您知道路徑、格式名稱或標籤。 如果您要將獨佔存取權授與參考佇列的第一個應用程式,請將 sharedModeDenyReceive 參數設定為 true。 否則,請將 設定 sharedModeDenyReceivefalse 或使用只有參數的 path 建構函式。

設定 sharedModeDenyReceivetrue 會影響存取消息佇列佇列的所有物件,包括其他應用程式。 參數的效果不限於此應用程式。

MessageQueue 構函式會建立 類別的新實例 MessageQueue ;它不會建立新的消息佇列佇列。 若要在消息佇列中建立新的佇列,請使用 Create(String)

參數的 path 語法取決於佇列的類型。

佇列類型 語法
公用佇列 MachineName\QueueName
私用佇列 MachineName\Private$\QueueName
記錄檔佇列 MachineName\QueueName\Journal$
計算機日誌佇列 MachineName\Journal$
計算機寄不出的信件佇列 MachineName\Deadletter$
計算機交易式寄不出的信件佇列 MachineName\XactDeadletter$

或者,您可以使用消息佇列佇列的格式名稱或標籤來描述佇列路徑。

參考 語法 範例
格式名稱 FormatName:格式名稱 ] FormatName:Public= 5A5F7535-AE9A-41d4-935C-845C2AFF7112

FormatName:DIRECT=SPX:NetworkNumber; HostNumber\QueueName

FormatName:DIRECT=TCP: IPAddress\QueueName

FormatName:DIRECT=OS: MachineName\QueueName
標籤 Label: [ 標籤 ] Label: TheLabel

若要離線運作,您必須使用格式名稱語法,而不是易記名稱語法。 否則會擲回例外狀況,因為 Active Directory 所在的主要域控制器 () 無法解析格式名稱的路徑。

MessageQueue如果 開啟參數設定為 truesharedModeDenyReceive佇列,則後續嘗試從佇列讀取的任何MessageQueue都會因為共用違規而產生 MessageQueueExceptionMessageQueueException如果 MessageQueue 嘗試以獨佔模式存取佇列,而另一個MessageQueue已經具有佇列的非獨佔存取權,也會擲回 。

下表顯示 實例 MessageQueue的初始屬性值。 這些值是以消息佇列佇列的屬性為基礎,其中包含 參數所 path 指定的路徑。

屬性 初始值
Authenticate false.
BasePriority 0.
Category Empty.
DefaultPropertiesToSend 類別的 DefaultPropertiesToSend 無參數建構函式所設定的值。
EncryptionRequired true,如果消息佇列佇列的隱私權等級設定為 “Body”;否則為 false
Formatter XmlMessageFormatter.
Label Empty.
MachineName 消息佇列佇列的計算機名稱屬性的值。
MaximumJournalSize InfiniteQueueSize.
MaximumQueueSize InfiniteQueueSize.
MessageReadPropertyFilter 類別的 MessagePropertyFilter 無參數建構函式所設定的值。
Path Empty如果建構函式未設定,則為 。
QueueName Empty如果建構函式未設定,則為 。
DenySharedReceive sharedModeDenyReceive 參數的值。
UseJournalQueue true如果已啟用消息佇列物件的日誌設定,則為 ;否則為 false

另請參閱

適用於

MessageQueue(String, QueueAccessMode)

初始化 MessageQueue 類別的新執行個體。

public:
 MessageQueue(System::String ^ path, System::Messaging::QueueAccessMode accessMode);
public MessageQueue (string path, System.Messaging.QueueAccessMode accessMode);
new System.Messaging.MessageQueue : string * System.Messaging.QueueAccessMode -> System.Messaging.MessageQueue
Public Sub New (path As String, accessMode As QueueAccessMode)

參數

path
String

這個 MessageQueue 參考的佇列位置,可能是代表本機電腦的 "."。

accessMode
QueueAccessMode

其中一個 QueueAccessMode 值。

適用於

MessageQueue(String, Boolean, Boolean)

初始化 MessageQueue 類別的新執行個體。

public:
 MessageQueue(System::String ^ path, bool sharedModeDenyReceive, bool enableCache);
public MessageQueue (string path, bool sharedModeDenyReceive, bool enableCache);
new System.Messaging.MessageQueue : string * bool * bool -> System.Messaging.MessageQueue
Public Sub New (path As String, sharedModeDenyReceive As Boolean, enableCache As Boolean)

參數

path
String

這個 MessageQueue 參考的佇列位置,可能是代表本機電腦的 "."。

sharedModeDenyReceive
Boolean

true 表示將獨佔讀取的存取權限授與存取佇列的第一個應用程式,否則為 false

enableCache
Boolean

true 表示建立並使用連接快取,否則為 false

範例

下列程式代碼範例會建立具有獨佔讀取權限且已啟用連線快取的新 MessageQueue

// Connect to a queue on the local computer, grant exclusive read
// access to the first application that accesses the queue, and
// enable connection caching.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue", true, true);

queue->Close();
// Connect to a queue on the local computer, grant exclusive read
// access to the first application that accesses the queue, and
// enable connection caching.
MessageQueue queue = new MessageQueue(".\\exampleQueue", true, true);

適用於

MessageQueue(String, Boolean, Boolean, QueueAccessMode)

初始化 MessageQueue 類別的新執行個體。

public:
 MessageQueue(System::String ^ path, bool sharedModeDenyReceive, bool enableCache, System::Messaging::QueueAccessMode accessMode);
public MessageQueue (string path, bool sharedModeDenyReceive, bool enableCache, System.Messaging.QueueAccessMode accessMode);
new System.Messaging.MessageQueue : string * bool * bool * System.Messaging.QueueAccessMode -> System.Messaging.MessageQueue
Public Sub New (path As String, sharedModeDenyReceive As Boolean, enableCache As Boolean, accessMode As QueueAccessMode)

參數

path
String

這個 MessageQueue 參考的佇列位置,可能是代表本機電腦的 "."。

sharedModeDenyReceive
Boolean

true 表示將獨佔讀取的存取權限授與存取佇列的第一個應用程式,否則為 false

enableCache
Boolean

true 表示建立並使用連接快取,否則為 false

accessMode
QueueAccessMode

其中一個 QueueAccessMode 值。

適用於