Dreamine.Communication.Abstractions
Dreamine.Communication.Abstractions는 Dreamine Communication 계열 패키지에서 사용하는 최하위 계약, 모델, 옵션, 연결 생명주기 인터페이스, enum, 공통 예외를 제공하는 패키지입니다.
이 패키지는 실제 통신 프로토콜을 구현하지 않습니다. TCP, UDP, Serial, RabbitMQ, HTTP, InMemory 메시징 및 향후 추가될 통신 어댑터들이 공통으로 사용할 기반 계약만 정의합니다.
목적
이 패키지의 목적은 애플리케이션 로직이 특정 통신 기술에 직접 의존하지 않도록 만드는 것입니다.
상위 애플리케이션 코드는 TCP, SerialPort, RabbitMQ, HTTP Client, 제조사 전용 통신 라이브러리에 직접 의존하지 않고 IMessageBus, IMessageTransport, IMessageProtocolAdapter, MessageEnvelope 같은 추상 계약에 의존해야 합니다.
패키지 역할
이 패키지는 Dreamine Communication 아키텍처의 계약 계층입니다.
Dreamine.Communication.Abstractions
↑
Dreamine.Communication.Core
↑
Sockets / Serial / RabbitMQ / WPF / FullKit
Abstractions는 Core, Sockets, Serial, RabbitMQ, WPF 또는 UI/런타임 전용 패키지를 참조하면 안 됩니다.
포함 구성
Interfaces
| 인터페이스 | 역할 |
|---|---|
IConnectionLifecycle |
State, ConnectAsync, DisconnectAsync를 가지는 공통 연결 생명주기 계약입니다. |
IMessageBus |
발행/구독 기반 메시징 계약입니다. |
IMessageTransport |
연결 기반 송수신 전송 계층 계약입니다. |
IMessageProtocolAdapter |
외부 프로토콜 payload와 MessageEnvelope 간 변환 계약입니다. |
IMessageRouter |
수신된 MessageEnvelope를 등록된 핸들러로 라우팅하는 계약입니다. |
IMessageSerializer |
MessageEnvelope 직렬화/역직렬화 계약입니다. |
Models
| 모델 | 역할 |
|---|---|
MessageEnvelope |
Dreamine Communication 전체에서 사용하는 표준 내부 메시지 단위입니다. |
CommunicationError |
통신 계층 공통 오류 정보 모델입니다. |
Options
| 옵션 | 역할 |
|---|---|
CommunicationOptions |
통신 이름, 자동 연결, 재연결 정책 같은 공통 통신 설정입니다. |
MessageBusOptions |
기본 라우트, 핸들러 실행 정책 같은 메시지 버스 설정입니다. |
TransportOptions |
Host, Port, Serial Port, BaudRate, Timeout 같은 공통 전송 설정입니다. |
Enums
| Enum | 역할 |
|---|---|
ConnectionState |
Disconnected, Connecting, Connected, Disconnecting, Faulted 상태를 표현합니다. |
TransportKind |
InMemory, Serial, TCP, UDP, HTTP, RabbitMQ 전송 계열을 표현합니다. |
Exceptions
| 예외 | 역할 |
|---|---|
CommunicationException |
Dreamine Communication 계층의 기본 예외입니다. |
CommunicationConnectionException |
연결 실패 전용 예외입니다. |
핵심 개념
MessageEnvelope
MessageEnvelope는 Dreamine Communication 내부에서 사용하는 표준 메시지 단위입니다.
public sealed class MessageEnvelope
{
public string MessageId { get; init; }
public string Name { get; init; }
public string Route { get; init; }
public byte[] Payload { get; init; }
public IReadOnlyDictionary<string, string> Headers { get; init; }
public DateTimeOffset CreatedAt { get; init; }
}
권장 사용 기준:
| 속성 | 권장 사용 방식 |
|---|---|
MessageId |
추적과 진단을 위한 고유 메시지 ID입니다. |
Name |
Machine.Start, Tcp.RawAvailable.Receive 같은 사람이 읽기 쉬운 메시지 이름입니다. |
Route |
메시지 버스와 라우터에서 사용하는 라우팅 키입니다. |
Payload |
실제 바이너리 데이터입니다. Text, JSON, 프로토콜 패킷, 장비 데이터 등을 모두 담을 수 있습니다. |
Headers |
프로토콜 이름, ContentType, Encoding, Source, CorrelationId 같은 메타데이터입니다. |
CreatedAt |
UTC 기준 메시지 생성 시각입니다. |
IMessageProtocolAdapter
IMessageProtocolAdapter는 외부 프로토콜 형식과 Dreamine 내부 메시지 모델을 분리하는 계약입니다.
외부 바이트
↓
Core 패키지의 Frame Codec
↓
IMessageProtocolAdapter.Decode(...)
↓
MessageEnvelope
반대 방향은 다음과 같습니다.
MessageEnvelope
↓
IMessageProtocolAdapter.Encode(...)
↓
Core 패키지의 Frame Codec
↓
외부 바이트
이 인터페이스는 여러 구현 패키지에서 필요하기 때문에 Abstractions에 위치합니다.
상위 패키지의 프로토콜 어댑터 예시는 다음과 같습니다.
| Adapter | 일반적인 용도 |
|---|---|
DreamineEnvelopeProtocolAdapter |
Dreamine 표준 Envelope 직렬화입니다. |
PlainTextProtocolAdapter |
단순 문자열 payload 처리입니다. |
RawJsonProtocolAdapter |
상위 계층이 전송 방식에 의존하지 않도록 JSON payload를 처리합니다. |
Core Frame Codec과의 관계
Frame Codec은 이 패키지가 아니라 Dreamine.Communication.Core에 구현됩니다.
책임 분리는 다음과 같습니다.
| 계층 | 책임 |
|---|---|
| Frame Codec | 바이트 스트림에서 메시지 경계를 분리하거나 기록합니다. |
| Protocol Adapter | 하나의 완성된 payload를 MessageEnvelope로 변환하거나 반대로 변환합니다. |
| Transport | TCP, Serial, RabbitMQ 같은 실제 송수신을 담당합니다. |
| Message Bus / Router | 메시지를 Route 기준으로 분배합니다. |
예를 들어 RawAvailableMessageFrameCodec은 Dreamine.Communication.Core에 위치하는 것이 맞습니다. 이 코덱은 CRLF나 길이 Prefix 없이 TCP로 들어온 test1 같은 단순 문자열도 수신 가능한 하나의 메시지로 처리할 수 있습니다. 이 기능을 위해 새로운 Abstraction을 추가할 필요는 없습니다. 기존 IMessageProtocolAdapter 계약이 payload와 MessageEnvelope 간 변환을 이미 담당하기 때문입니다.
권장 조합은 다음과 같습니다.
| 시나리오 | Frame Codec | Protocol Adapter |
|---|---|---|
| Dreamine 내부 표준 통신 | LengthPrefixedMessageFrameCodec |
DreamineEnvelopeProtocolAdapter |
| 구분자 기반 문자열 통신 | DelimiterMessageFrameCodec |
PlainTextProtocolAdapter |
| Hercules 또는 단순 Raw TCP 문자열 테스트 | RawAvailableMessageFrameCodec |
PlainTextProtocolAdapter |
| Raw JSON Line 통신 | DelimiterMessageFrameCodec |
RawJsonProtocolAdapter |
인터페이스 책임 기준
IConnectionLifecycle
연결 상태와 명시적인 연결/해제 동작을 가지는 객체에 사용합니다.
public interface IConnectionLifecycle
{
ConnectionState State { get; }
Task ConnectAsync(CancellationToken cancellationToken = default);
Task DisconnectAsync(CancellationToken cancellationToken = default);
}
IMessageTransport
TCP Client, TCP Server, Serial Transport처럼 연결 기반 송수신을 담당하는 컴포넌트에 사용합니다.
public interface IMessageTransport : IConnectionLifecycle, IAsyncDisposable
{
TransportKind Kind { get; }
event EventHandler<MessageEnvelope>? MessageReceived;
Task SendAsync(MessageEnvelope message, CancellationToken cancellationToken = default);
}
IMessageBus
발행/구독 기반 메시징에 사용합니다.
public interface IMessageBus : IConnectionLifecycle, IAsyncDisposable
{
TransportKind Kind { get; }
Task PublishAsync(MessageEnvelope message, CancellationToken cancellationToken = default);
Task SubscribeAsync(
string route,
Func<MessageEnvelope, CancellationToken, Task> handler,
CancellationToken cancellationToken = default);
}
IMessageRouter
메시지 분배 책임을 MessageBus 또는 Transport 구현체에서 분리해야 할 때 사용합니다.
IMessageSerializer
MessageEnvelope 직렬화 방식을 교체 가능하게 만들 때 사용합니다. 예를 들어 JSON, Binary, 압축, 암호화 직렬화 구현체를 상위 패키지에서 제공할 수 있습니다.
TransportKind
TransportKind는 특정 구현 클래스가 아니라 통신 계열을 나타냅니다.
InMemory
Serial
Tcp
Udp
Http
RabbitMq
예시는 다음과 같습니다.
| TransportKind | 가능한 구현체 |
|---|---|
InMemory |
InMemoryMessageBus |
Tcp |
TCP Client/Server Transport |
Serial |
RS232/SerialPort Transport |
RabbitMq |
RabbitMQ Message Bus |
Udp |
UDP Transport |
Http |
HTTP 요청/응답 또는 스트리밍 어댑터 |
ConnectionState
ConnectionState는 Transport와 MessageBus 모두에서 사용할 수 있는 공통 상태 모델입니다.
Disconnected → Connecting → Connected → Disconnecting → Disconnected
↓
Faulted
권장 의미는 다음과 같습니다.
| 상태 | 의미 |
|---|---|
Disconnected |
연결되지 않은 상태입니다. |
Connecting |
연결을 시도 중입니다. |
Connected |
통신이 활성화된 상태입니다. |
Disconnecting |
연결 해제 중입니다. |
Faulted |
통신 실패 또는 비정상 상태입니다. |
Options
CommunicationOptions
var options = new CommunicationOptions
{
Name = "MachineTcp",
AutoConnect = true,
EnableAutoReconnect = true,
ReconnectIntervalMs = 3000
};
MessageBusOptions
var options = new MessageBusOptions
{
Kind = TransportKind.InMemory,
DefaultRoute = "machine.event",
ThrowOnHandlerError = true,
EnableParallelHandlers = false
};
TransportOptions
var options = new TransportOptions
{
Kind = TransportKind.Tcp,
Host = "127.0.0.1",
Port = 15002,
ReadTimeoutMs = 3000,
WriteTimeoutMs = 3000
};
Serial 통신에서는 다음처럼 사용할 수 있습니다.
var options = new TransportOptions
{
Kind = TransportKind.Serial,
PortName = "COM1",
BaudRate = 9600,
ReadTimeoutMs = 3000,
WriteTimeoutMs = 3000
};
예시
using Dreamine.Communication.Abstractions.Interfaces;
using Dreamine.Communication.Abstractions.Models;
public sealed class MachineMessageService
{
private readonly IMessageBus _messageBus;
public MachineMessageService(IMessageBus messageBus)
{
_messageBus = messageBus ?? throw new ArgumentNullException(nameof(messageBus));
}
public Task PublishStartAsync(CancellationToken cancellationToken = default)
{
var message = new MessageEnvelope
{
Name = "Machine.Start",
Route = "machine.command.start",
Payload = Array.Empty<byte>(),
Headers = new Dictionary<string, string>
{
["ContentType"] = "application/octet-stream",
["Source"] = "MachineMessageService"
}
};
return _messageBus.PublishAsync(message, cancellationToken);
}
}
추상화와 구체 IMessageBus 구현체만으로 동작하는 엔드투엔드 흐름은 다음과 같습니다.
using System.Text;
using Dreamine.Communication.Abstractions.Interfaces;
using Dreamine.Communication.Abstractions.Models;
// IMessageBus는 구체 패키지에서 제공합니다.
// 예: Dreamine.Communication.Core의 InMemoryMessageBus,
// Dreamine.Communication.RabbitMQ의 RabbitMqMessageBus 등.
IMessageBus bus = /* 구체 구현체 */;
await bus.ConnectAsync();
await bus.SubscribeAsync(
"machine.command.start",
(message, _) =>
{
var text = Encoding.UTF8.GetString(message.Payload);
Console.WriteLine($"RX {message.Name}: {text}");
return Task.CompletedTask;
});
await bus.PublishAsync(new MessageEnvelope
{
Name = "Machine.Start",
Route = "machine.command.start",
Payload = Encoding.UTF8.GetBytes("go"),
Headers = new Dictionary<string, string>
{
["ContentType"] = "text/plain"
}
});
await bus.DisconnectAsync();
애플리케이션 코드는 IMessageBus와 MessageEnvelope에만 의존합니다. InMemory, RabbitMQ, TransportMessageBusAdapter 기반 Transport 어느 쪽으로 바꾸어도 이 코드는 변경되지 않습니다.
설계 원칙
- 추상 계약은 구체 구현체에 의존하지 않습니다.
- 애플리케이션 레이어가 특정 통신 라이브러리를 직접 참조하지 않게 합니다.
- TCP, Serial, RabbitMQ, UDP, HTTP, MQTT 및 향후 어댑터를 상위 레이어 변경 없이 추가할 수 있어야 합니다.
- 메시지 형식 변환과 프레임 경계 감지는 분리합니다.
- 의존성 역전 원칙과 인터페이스 기반 설계를 따릅니다.
- 패키지는 가볍고 UI 프레임워크에 독립적으로 유지합니다.
- 의존성 방향은 단방향입니다. 구현체가 추상화에 의존해야 하며, 추상화가 구현체에 의존하면 안 됩니다.
대상 프레임워크
net8.0
이 패키지는 WPF를 필요로 하지 않으며, Windows 전용 UI 프레임워크에 의존하지 않습니다.
관련 패키지
Dreamine.Communication.CoreDreamine.Communication.SocketsDreamine.Communication.SerialDreamine.Communication.RabbitMQDreamine.Communication.WpfDreamine.Communication.FullKit
라이선스
이 프로젝트는 MIT 라이선스를 따릅니다.
구조 다이어그램
classDiagram
class IConnectionClient {
<<interface>>
+IsConnected bool
+ConnectAsync() Task
+DisconnectAsync() Task
+Connected event
+Disconnected event
}
class IMessageClient~TMsg~ {
<<interface>>
+SendAsync(TMsg) Task
+MessageReceived event
}
class IRequestReplyClient~TReq, TResp~ {
<<interface>>
+RequestAsync(TReq) Task~TResp~
+TimeoutMs int
}
class IMessageBroker {
<<interface>>
+PublishAsync(string, object) Task
+SubscribeAsync(string, Action~object~) Task~IDisposable~
}
class ConnectionEventArgs {
+string RemoteEndpoint
+DateTime Timestamp
+Exception? Error
}
IConnectionClient <|-- IMessageClient~TMsg~
IMessageClient~TMsg~ <|-- IRequestReplyClient~TReq, TResp~API 문서
타입
\if KO 통신 연결 또는 연결 해제 과정에서 발생하는 예외입니다. \endif \if EN Represents an error that occurs while establishing or closing a communication connection. \endif
\if KO 통신 계층에서 발생한 구조화된 오류 정보를 나타냅니다. \endif \if EN Represents structured information about an error raised by the communication layer. \endif
\if KO Dreamine Communication 계층에서 발생하는 예외의 기본 클래스입니다. \endif \if EN Provides the base exception for errors raised by the Dreamine Communication layer. \endif
\if KO Dreamine Communication 인스턴스의 공통 동작을 구성합니다. \endif \if EN Configures common behavior for a Dreamine Communication instance. \endif
\if KO 통신 연결 상태를 나타냅니다. \endif \if EN Specifies the state of a communication connection. \endif
\if KO 연결이 끊긴 상태에서 송신 요청을 처리하는 정책입니다. \endif \if EN Specifies how send requests are handled while disconnected. \endif
\if KO 연결 생명주기를 가지는 통신 객체의 공통 계약입니다. \endif \if EN Defines the common contract for communication objects that have a connection lifecycle. \endif
\if KO 메시지 발행 및 구독 기능을 제공하는 공통 메시지 버스 계약입니다. \endif \if EN Defines a common message bus contract for publishing and subscribing to messages. \endif
\if KO 외부 프로토콜 메시지와 Dreamine 표준 간 변환을 담당하는 계약입니다. \endif \if EN Defines conversion between external protocol messages and the Dreamine-standard . \endif
\if KO 메시지 라우팅 기능의 공통 계약입니다. \endif \if EN Defines the common contract for routing messages. \endif
\if KO 직렬화 및 역직렬화 계약입니다. \endif \if EN Defines serialization and deserialization for instances. \endif
\if KO 연결 기반 메시지 전송 계층의 공통 계약입니다. \endif \if EN Defines the common contract for connection-oriented message transports. \endif
\if KO 서버형 전송 계층의 접속 클라이언트 모니터링 정보를 제공하는 계약입니다. \endif \if EN Defines monitoring information for clients connected to a server transport. \endif
\if KO 메시지 버스의 전송 방식과 메시지 처리 동작을 구성합니다. \endif \if EN Configures the transport and message-handling behavior of a message bus. \endif
\if KO Dreamine Communication에서 전송과 라우팅에 사용하는 공통 메시지 봉투입니다. \endif \if EN Represents the common message envelope used for transport and routing in Dreamine Communication. \endif
\if KO 연결되지 않은 동안 사용할 송신 큐의 동작과 제한을 구성합니다. \endif \if EN Configures the behavior and limits of the outbound queue used while disconnected. \endif
\if KO 연결 실패 후 적용할 자동 재연결 및 지수 백오프 정책을 구성합니다. \endif \if EN Configures automatic reconnection and exponential backoff after connection failures. \endif
\if KO 통신 전송 방식의 종류를 나타냅니다. \endif \if EN Specifies the kind of communication transport. \endif
\if KO 연결 기반 전송 계층의 네트워크 및 시리얼 연결 값을 구성합니다. \endif \if EN Configures network and serial connection values for a connection-oriented transport. \endif
CommunicationConnectionException
\if KO 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class. \endif
\if KO 지정한 오류 메시지를 사용하여 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class with a specified error message. \endif
message— \if KO 연결 오류의 원인을 설명하는 메시지입니다. \endif \if EN The message that explains the reason for the connection error. \endif\if KO 지정한 오류 메시지와 내부 예외를 사용하여 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class with a specified error message and inner exception. \endif
message— \if KO 연결 오류의 원인을 설명하는 메시지입니다. \endif \if EN The message that explains the reason for the connection error. \endifinnerException— \if KO 현재 연결 예외의 원인이 된 예외입니다. \endif \if EN The exception that caused the current connection exception. \endifCommunicationError
\if KO 오류를 식별하는 코드입니다. \endif \if EN Gets the code that identifies the error. \endif
\if KO 오류가 발생한 UTC 기준 시각을 가져옵니다. \endif \if EN Gets the UTC timestamp at which the error occurred. \endif
\if KO 오류의 원인이 된 내부 예외를 가져옵니다. \endif \if EN Gets the inner exception that caused the error. \endif
\if KO 오류를 설명하는 사람이 읽을 수 있는 메시지입니다. \endif \if EN Gets the human-readable message that describes the error. \endif
\if KO 오류 발생 위치 또는 통신 채널 이름입니다. \endif \if EN Gets the error source or communication channel name. \endif
CommunicationException
\if KO 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class. \endif
\if KO 지정한 오류 메시지를 사용하여 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class with a specified error message. \endif
message— \if KO 예외의 원인을 설명하는 오류 메시지입니다. \endif \if EN The error message that explains the reason for the exception. \endif\if KO 지정한 오류 메시지와 내부 예외를 사용하여 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of the class with a specified error message and inner exception. \endif
message— \if KO 예외의 원인을 설명하는 오류 메시지입니다. \endif \if EN The error message that explains the reason for the exception. \endifinnerException— \if KO 현재 예외의 원인이 된 예외입니다. \endif \if EN The exception that caused the current exception. \endifCommunicationOptions
\if KO 초기화 시 자동으로 연결할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether to connect automatically during initialization. \endif
\if KO 연결 오류 후 자동 재연결을 사용할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether automatic reconnection is enabled after a connection error. \endif
\if KO 로그와 진단에서 통신 인스턴스를 식별할 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the name used to identify the communication instance in logs and diagnostics. \endif
\if KO 재연결 시도 사이의 대기 시간(밀리초)을 가져오거나 설정합니다. \endif \if EN Gets or sets the delay, in milliseconds, between reconnection attempts. \endif
ConnectionState
\if KO 연결된 상태입니다. TCP 클라이언트에서는 원격 대상에 연결된 상태를 의미합니다. \endif \if EN The communication object is connected; for a TCP client, it is connected to the remote endpoint. \endif
\if KO 연결을 시도 중인 상태입니다. \endif \if EN A connection attempt is in progress. \endif
\if KO 연결되지 않은 상태입니다. \endif \if EN The communication object is disconnected. \endif
\if KO 연결 해제 중인 상태입니다. \endif \if EN A disconnection operation is in progress. \endif
\if KO 연결 또는 통신 오류로 인해 장애 상태입니다. \endif \if EN The communication object is faulted because of a connection or communication error. \endif
\if KO TCP 서버가 클라이언트 접속을 수신 대기 중인 상태입니다. \endif \if EN A TCP server is listening for incoming client connections. \endif
DisconnectedSendPolicy
\if KO 송신 요청을 즉시 실패 처리합니다. \endif \if EN Fails the send request immediately. \endif
\if KO 송신 요청을 큐에 저장하고 연결 복구 후 전송합니다. \endif \if EN Queues the send request and transmits it after the connection is restored. \endif
\if KO 연결될 때까지 대기한 뒤 전송합니다. \endif \if EN Waits for a connection before transmitting the message. \endif
IConnectionLifecycle
\if KO 통신 대상과의 연결을 비동기적으로 시작합니다. \endif \if EN Asynchronously establishes a connection to the communication endpoint. \endif
cancellationToken— \if KO 연결 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the connection operation. \endif반환: \if KO 비동기 연결 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous connection operation. \endif
\if KO 현재 연결을 비동기적으로 종료합니다. \endif \if EN Asynchronously closes the current connection. \endif
cancellationToken— \if KO 연결 종료 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the disconnection operation. \endif반환: \if KO 비동기 연결 종료 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous disconnection operation. \endif
\if KO 현재 연결 상태를 가져옵니다. \endif \if EN Gets the current connection state. \endif
IMessageBus
\if KO 메시지를 비동기적으로 발행합니다. \endif \if EN Asynchronously publishes a message. \endif
message— \if KO 발행할 메시지 봉투입니다. \endif \if EN The message envelope to publish. \endifcancellationToken— \if KO 발행 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the publish operation. \endif반환: \if KO 비동기 발행 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous publish operation. \endif
\if KO 지정한 라우트의 메시지를 비동기적으로 구독합니다. \endif \if EN Asynchronously subscribes to messages for the specified route. \endif
route— \if KO 구독할 메시지 라우트입니다. \endif \if EN The message route to subscribe to. \endifhandler— \if KO 수신된 메시지를 처리할 비동기 처리기입니다. \endif \if EN The asynchronous handler that processes received messages. \endifcancellationToken— \if KO 구독 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the subscription operation. \endif반환: \if KO 비동기 구독 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous subscription operation. \endif
\if KO 메시지 버스가 사용하는 전송 방식의 종류를 가져옵니다. \endif \if EN Gets the transport kind used by the message bus. \endif
IMessageProtocolAdapter
\if KO 수신된 원시 메시지 데이터를 로 변환합니다. \endif \if EN Converts received raw message data into a . \endif
payload— \if KO 프레임 코덱을 통해 분리된 원시 메시지 데이터입니다. \endif \if EN The raw message data separated by a frame codec. \endif반환: \if KO 변환된 Dreamine 내부 표준 메시지입니다. \endif \if EN The converted Dreamine-standard internal message. \endif
\if KO 를 외부 프로토콜 송신 데이터로 변환합니다. \endif \if EN Converts a into outbound data for an external protocol. \endif
message— \if KO 송신할 Dreamine 내부 표준 메시지입니다. \endif \if EN The Dreamine-standard internal message to send. \endif반환: \if KO 외부 프로토콜로 송신할 원시 메시지 데이터입니다. \endif \if EN The raw message data to send through the external protocol. \endif
IMessageRouter
\if KO 메시지의 라우트 정보에 따라 메시지를 비동기적으로 처리합니다. \endif \if EN Asynchronously processes a message according to its route information. \endif
message— \if KO 라우팅할 메시지 봉투입니다. \endif \if EN The message envelope to route. \endifcancellationToken— \if KO 라우팅 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the routing operation. \endif반환: \if KO 비동기 라우팅 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous routing operation. \endif
IMessageSerializer
\if KO 바이트 배열을 메시지로 역직렬화합니다. \endif \if EN Deserializes a byte array into a message. \endif
data— \if KO 역직렬화할 메시지 데이터를 포함하는 바이트 배열입니다. \endif \if EN The byte array containing the message data to deserialize. \endif반환: \if KO 역직렬화된 메시지 봉투입니다. \endif \if EN The deserialized message envelope. \endif
\if KO 메시지를 바이트 배열로 직렬화합니다. \endif \if EN Serializes a message into a byte array. \endif
message— \if KO 직렬화할 메시지 봉투입니다. \endif \if EN The message envelope to serialize. \endif반환: \if KO 직렬화된 메시지를 포함하는 바이트 배열입니다. \endif \if EN A byte array containing the serialized message. \endif
IMessageTransport
\if KO 메시지를 비동기적으로 전송합니다. \endif \if EN Asynchronously sends a message. \endif
message— \if KO 전송할 메시지 봉투입니다. \endif \if EN The message envelope to send. \endifcancellationToken— \if KO 전송 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the send operation. \endif반환: \if KO 비동기 전송 작업을 나타내는 작업입니다. \endif \if EN A task that represents the asynchronous send operation. \endif
\if KO 전송 계층이 사용하는 전송 방식의 종류를 가져옵니다. \endif \if EN Gets the transport kind used by this transport. \endif
\if KO 메시지를 수신했을 때 발생합니다. \endif \if EN Occurs when a message is received. \endif
IServerTransportMonitor
\if KO 현재 서버에 연결된 클라이언트 수를 가져옵니다. \endif \if EN Gets the number of clients currently connected to the server. \endif
\if KO 서버에 연결된 클라이언트 수가 변경될 때 발생합니다. \endif \if EN Occurs when the number of clients connected to the server changes. \endif
MessageBusOptions
\if KO 메시지에 라우트가 지정되지 않았을 때 사용할 기본 라우트를 가져오거나 설정합니다. \endif \if EN Gets or sets the default route used when a message does not specify one. \endif
\if KO 여러 메시지 처리기를 병렬로 실행할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether multiple message handlers execute in parallel. \endif
\if KO 메시지 버스가 사용할 전송 방식을 가져오거나 설정합니다. \endif \if EN Gets or sets the transport kind used by the message bus. \endif
\if KO 메시지 처리기가 실패할 때 예외를 호출자에게 다시 던질지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether handler exceptions are rethrown to the caller. \endif
MessageEnvelope
\if KO 메시지가 생성된 UTC 기준 시각을 가져옵니다. \endif \if EN Gets the UTC timestamp at which the message was created. \endif
\if KO 메시지와 함께 전달되는 읽기 전용 헤더를 가져옵니다. \endif \if EN Gets the read-only headers carried with the message. \endif
\if KO 메시지를 고유하게 식별하는 값을 가져옵니다. \endif \if EN Gets the value that uniquely identifies the message. \endif
\if KO 메시지의 논리적 이름을 가져옵니다. \endif \if EN Gets the logical name of the message. \endif
\if KO 실제 전송할 이진 페이로드를 가져옵니다. \endif \if EN Gets the binary payload to transport. \endif
\if KO 메시지를 전달할 라우트를 가져옵니다. \endif \if EN Gets the route to which the message is delivered. \endif
OutboundQueueOptions
\if KO 연결 끊김 상태에서 송신 요청을 처리하는 정책을 가져오거나 설정합니다. \endif \if EN Gets or sets the policy used for send requests while disconnected. \endif
\if KO 큐가 가득 찼을 때 가장 오래된 메시지를 제거할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the oldest message is removed when the queue is full. \endif
\if KO 재연결에 성공했을 때 큐의 메시지를 자동으로 전송할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether queued messages are flushed automatically after reconnection. \endif
\if KO 큐에 저장된 메시지의 최대 보관 시간을 가져오거나 설정합니다. 이면 만료하지 않습니다. \endif \if EN Gets or sets the maximum age of a queued message; disables expiration. \endif
\if KO 송신 큐에 보관할 수 있는 최대 메시지 수를 가져오거나 설정합니다. \endif \if EN Gets or sets the maximum number of messages retained in the outbound queue. \endif
ReconnectPolicy
\if KO 재연결 실패 후 대기 시간에 적용할 증가 배율을 가져오거나 설정합니다. \endif \if EN Gets or sets the multiplier applied to the delay after a failed reconnection attempt. \endif
\if KO 자동 재연결을 사용할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether automatic reconnection is enabled. \endif
\if KO 첫 재연결 시도 전의 대기 시간을 가져오거나 설정합니다. \endif \if EN Gets or sets the delay before the first reconnection attempt. \endif
\if KO 재연결 시도 사이에 허용되는 최대 대기 시간을 가져오거나 설정합니다. \endif \if EN Gets or sets the maximum delay allowed between reconnection attempts. \endif
\if KO 최대 재시도 횟수를 가져오거나 설정합니다. 이면 횟수를 제한하지 않습니다. \endif \if EN Gets or sets the maximum retry count; allows unlimited retries. \endif
\if KO 연결 상태를 감시하는 주기를 가져오거나 설정합니다. \endif \if EN Gets or sets the interval at which the connection state is monitored. \endif
TransportKind
\if KO HTTP 기반 통신입니다. \endif \if EN HTTP-based communication. \endif
\if KO 프로세스 메모리 내부 통신입니다. \endif \if EN In-process, in-memory communication. \endif
\if KO RabbitMQ 기반 메시지 브로커 통신입니다. \endif \if EN RabbitMQ-based message broker communication. \endif
\if KO RS-232 또는 기타 시리얼 통신입니다. \endif \if EN RS-232 or other serial communication. \endif
\if KO TCP 통신입니다. \endif \if EN TCP communication. \endif
\if KO UDP 통신입니다. \endif \if EN UDP communication. \endif
TransportOptions
\if KO RS-232 계열 전송에서 사용할 보드율을 가져오거나 설정합니다. \endif \if EN Gets or sets the baud rate used by RS-232 transports. \endif
\if KO 통신 대상 호스트 이름 또는 IP 주소를 가져오거나 설정합니다. TCP 또는 HTTP 계열에서 사용합니다. \endif \if EN Gets or sets the target host name or IP address used by TCP- or HTTP-based transports. \endif
\if KO 사용할 전송 방식을 가져오거나 설정합니다. \endif \if EN Gets or sets the transport kind to use. \endif
\if KO 통신 대상의 네트워크 포트 번호를 가져오거나 설정합니다. \endif \if EN Gets or sets the network port number of the communication endpoint. \endif
\if KO RS-232 계열 전송에서 사용할 시리얼 포트 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the serial port name used by RS-232 transports. \endif
\if KO 읽기 작업의 제한 시간(밀리초)을 가져오거나 설정합니다. \endif \if EN Gets or sets the read timeout, in milliseconds. \endif
\if KO 쓰기 작업의 제한 시간(밀리초)을 가져오거나 설정합니다. \endif \if EN Gets or sets the write timeout, in milliseconds. \endif