MessageQueue.MachineName 속성

정의

메시지 큐가 있는 컴퓨터의 이름을 가져오거나 설정합니다.

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

속성 값

큐가 있는 컴퓨터의 이름입니다. 메시지 큐의 기본값은 "."이며, 이는 로컬 컴퓨터를 나타냅니다.

특성

예외

MachineNamenull인 경우 또는

컴퓨터 이름이 잘못되었습니다(예: 구문이 잘못된 경우).

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

예제

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

// Set the queue's MachineName property value to the name of the local
// computer.
queue.MachineName = ".";

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

설명

MachineNamePath의 이름 구문에 필수적인 구성 요소입니다. 다음 표에서는 친숙한 이름을 사용하여 큐 경로를 식별하려는 경우 지정된 형식의 큐에 사용해야 하는 구문을 보여 있습니다.

큐 유형 Syntax
공개 큐 MachineName\QueueName
개인 큐 MachineName\Private$\QueueName
저널 큐 MachineName\QueueName\Journal$
컴퓨터 저널 큐 MachineName\Journal$
컴퓨터 배달 못 한 편지 큐 MachineName\Deadletter$
컴퓨터 트랜잭션 배달 못 한 편지 큐 MachineName\XactDeadletter$

를 지정할 때 로컬 컴퓨터에 "."를 MachineName사용합니다. 이 속성에 대해 컴퓨터 이름만 인식됩니다(예: Server0). 속성은 MachineName IP 주소 형식을 지원하지 않습니다.

정의 하는 경우는 Path 의 측면에서 MachineName, 애플리케이션 도메인 컨트롤러는 경로 변환에 대 한 필수 사항 이므로 오프 라인으로 작업 하는 경우 예외를 throw 합니다. 따라서 오프라인으로 작업할 때 구문에 Path 를 사용해야 FormatName 합니다.

MachineName, PathQueueName 속성은 관련되어 있습니다. 속성을 변경하면 MachineName 속성이 Path 변경 됩니다. 새 및 에서 MachineName 빌드됩니다 QueueName. Path 를 변경하면(예: 형식 이름 구문 사용) 및 QueueName 속성을 다시 설정 MachineName 하여 새 큐를 참조합니다. 속성이 QueueName 비어 Path 있으면 은 지정한 컴퓨터의 저널 큐로 설정됩니다.

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

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

적용 대상

추가 정보