MessageQueue.Label 속성

정의

큐 설명을 가져오거나 설정합니다.

public:
 property System::String ^ Label { System::String ^ get(); void set(System::String ^ value); };
[System.Messaging.MessagingDescription("MQ_Label")]
public string Label { get; set; }
[<System.Messaging.MessagingDescription("MQ_Label")>]
member this.Label : string with get, set
Public Property Label As String

속성 값

메시지 큐의 레이블입니다. 기본값은 빈 문자열("")입니다.

특성

예외

레이블이 잘못된 값으로 설정되었습니다.

메시지 큐 메서드에 액세스하는 동안 오류가 발생한 경우

예제

다음 코드 예제에서는 메시지 큐 Label 의 속성 값을 가져오고 설정합니다.

// Set the queue's Label property value.
queue.Label = "Example Queue";

// Display the new value of the queue's Label property.
Console.WriteLine("MessageQueue.Label: {0}",
    queue.Label);

설명

메시지 큐 레이블의 최대 길이는 124자입니다.

속성은 Label 모든 큐에서 고유할 필요가 없습니다. 그러나 여러 큐가 동일한 Label를 공유하는 경우 메서드를 Send(Object) 사용하여 모든 큐에 메시지를 브로드캐스트할 수 없습니다. 메시지를 보낼 때 속성에 레이블 Path 구문을 사용하는 경우 가 고유하지 않으면 Label 예외가 throw됩니다.

다음 표에서는 이 속성을 다양한 작업 그룹 모드에서 사용할 수 있는지 여부를 보여 줍니다.

작업 그룹 모드 사용 가능
수집 Yes
로컬 컴퓨터 및 직접 형식 이름 Yes
원격 컴퓨터 No
원격 컴퓨터 및 직접 형식 이름 No

적용 대상

추가 정보