Dreamine.Communication.Core
Dreamine.Communication.Core는 Dreamine Communication 계열 패키지의 일부입니다.
이 패키지는 구체 통신 어댑터들이 공통으로 사용하는 런타임 계층을 제공합니다. TCP, Serial, RabbitMQ, WPF를 직접 구현하지 않습니다. 구체 Transport는 이 패키지에 의존하고, Protocol Adapter와 Frame Codec을 조합해서 사용합니다.
설명
Dreamine Communication을 위한 Core MessageBus, Routing, Serialization, Protocol Adapter, Message Framing, Transport-to-MessageBus Adapter 유틸리티를 제공합니다.
패키지 역할
Dreamine.Communication.Abstractions
↑
Dreamine.Communication.Core
↑
Sockets / Serial / RabbitMQ / WPF
Core는 Transport와 독립적인 규칙을 담당합니다.
MessageEnvelope를 직렬화하는 방법- 외부 Payload를
MessageEnvelope로 변환하는 방법 - 바이트 스트림에서 메시지 경계를 나누는 방법
- 애플리케이션 내부에서 메시지를 라우팅하거나 발행하는 방법
Socket 연결, Serial Port 연결, RabbitMQ 연결, WPF UI 로직은 Core의 책임이 아닙니다.
주요 기능
- 메모리 기반 메시지 버스
- 메시지 Route Dispatcher
MessageEnvelopeJSON 직렬화- 내부/외부 Payload 형식 변환을 위한 Protocol Adapter
- TCP 같은 바이트 스트림을 위한 Frame Codec
- Transport-to-MessageBus 어댑터
주요 구성 요소
Message Bus
| 타입 | 역할 |
|---|---|
InMemoryMessageBus |
프로세스 내부 Publish/Subscribe 메시지 버스입니다. |
TransportMessageBusAdapter |
IMessageTransport를 IMessageBus처럼 사용할 수 있게 감싸는 어댑터입니다. |
Routing
| 타입 | 역할 |
|---|---|
MessageRouter |
Route 기준으로 Handler를 등록하고 MessageEnvelope를 Dispatch합니다. |
MessageHandlerRegistration |
Handler 등록 메타데이터를 표현합니다. |
Serialization
| 타입 | 역할 |
|---|---|
JsonMessageSerializer |
System.Text.Json 기반으로 MessageEnvelope를 직렬화/역직렬화합니다. |
Protocol Adapters
Protocol Adapter는 원시 Payload 바이트와 Dreamine MessageEnvelope 사이의 변환을 담당합니다.
| 타입 | 사용 목적 |
|---|---|
DreamineEnvelopeProtocolAdapter |
Dreamine 내부 표준 형식입니다. 전체 MessageEnvelope JSON을 Encode/Decode합니다. |
PlainTextProtocolAdapter |
외부 일반 문자열 통신용입니다. 문자열 바이트를 MessageEnvelope로 감쌉니다. |
RawJsonProtocolAdapter |
Dreamine 고정 스키마가 없는 외부 JSON 통신용입니다. Raw JSON을 MessageEnvelope로 감쌉니다. |
Frame Codecs
Frame Codec은 바이트 스트림에서 메시지 경계를 판단하는 규칙입니다.
| 타입 | 경계 판단 방식 | 권장 용도 |
|---|---|---|
LengthPrefixedMessageFrameCodec |
4바이트 Big-Endian 길이 Prefix를 사용합니다. | Dreamine 내부 통신, 안정적인 Binary-safe 프로토콜 |
DelimiterMessageFrameCodec |
\r\n 같은 Delimiter가 나올 때까지 읽습니다. |
Line Ending을 보내는 외부 장비/툴 문자열 통신 |
RawAvailableMessageFrameCodec |
현재 수신된 바이트를 즉시 하나의 메시지로 처리합니다. | Hercules, 임시 테스트, CRLF나 길이 Prefix 없이 단순 문자열을 보내는 외부 툴 |
Frame Codec 선택 기준
| 상황 | 권장 Codec | 이유 |
|---|---|---|
| Dreamine ↔ Dreamine 통신 | LengthPrefixedMessageFrameCodec |
메시지 경계를 정확히 보존하고 임의 Payload를 안전하게 처리합니다. |
CRLF 또는 LF로 끝나는 문자열 프로토콜 |
DelimiterMessageFrameCodec |
Line 기반 프로토콜과 맞습니다. |
Hercules에서 test1만 보내고 CRLF가 없음 |
RawAvailableMessageFrameCodec |
Delimiter를 기다리지 않고 즉시 Receive 처리할 수 있습니다. |
CRLF로 끝나는 Raw JSON |
DelimiterMessageFrameCodec + RawJsonProtocolAdapter |
JSON Payload를 그대로 유지하면서 메시지 경계도 보존합니다. |
RawAvailableMessageFrameCodec
RawAvailableMessageFrameCodec은 단순 Raw Byte 수신 상황을 위한 호환용 Codec입니다. 내부 Stream Read에서 반환된 바이트를 즉시 하나의 Frame으로 반환합니다.
다음처럼 외부 툴이 단순 문자열만 보내는 경우에 유용합니다.
test1
이때 아래 요소가 없어도 Receive 처리가 가능합니다.
- Length Prefix
CRLFLF- 고정 JSON Envelope
사용 예시:
using System.Text;
using Dreamine.Communication.Core.Framing;
using Dreamine.Communication.Core.Protocols;
using Dreamine.Communication.Sockets.Options;
using Dreamine.Communication.Sockets.Servers;
var server = new TcpServerTransport(
new TcpServerTransportOptions
{
Host = "127.0.0.1",
Port = 15002
},
new PlainTextProtocolAdapter(
Encoding.UTF8,
"tcp.raw.available",
"Tcp.RawAvailable"),
new RawAvailableMessageFrameCodec());
server.MessageReceived += (_, message) =>
{
var text = Encoding.UTF8.GetString(message.Payload);
Console.WriteLine($"RX: {text}");
};
await server.ConnectAsync();
TCP 주의 사항
TCP는 Message Protocol이 아니라 Stream Protocol입니다. RawAvailableMessageFrameCodec은 의도적으로 허용적인 방식이지만, 애플리케이션 레벨의 메시지 경계를 보장하지 않습니다.
예를 들어 빠르게 두 번 보낸 데이터가 다음처럼 합쳐질 수 있습니다.
test1test2
또는 한 번 보낸 데이터가 다음처럼 쪼개질 수도 있습니다.
te
st1
따라서 RawAvailableMessageFrameCodec은 호환성, 디버깅, 임시 테스트, Framing을 제공하지 않는 외부 툴 대응용으로만 사용하는 것이 좋습니다. 운영 프로토콜에는 LengthPrefixedMessageFrameCodec 또는 DelimiterMessageFrameCodec을 우선 권장합니다.
권장 Protocol 조합
| Mode | Protocol Adapter | Frame Codec |
|---|---|---|
| Dreamine Envelope | DreamineEnvelopeProtocolAdapter |
LengthPrefixedMessageFrameCodec |
| Plain Text Line Protocol | PlainTextProtocolAdapter |
DelimiterMessageFrameCodec |
| Plain Text Raw Receive | PlainTextProtocolAdapter |
RawAvailableMessageFrameCodec |
| Raw JSON Line Protocol | RawJsonProtocolAdapter |
DelimiterMessageFrameCodec |
설계 원칙
- 구체 Transport 구현체를 상위 레이어와 분리합니다.
Dreamine.Communication.Abstractions의 계약에 의존합니다.- 패키지 책임을 작고 명확하게 유지합니다.
- 단방향 의존성 흐름을 유지합니다.
- Payload Protocol 변환과 Stream Frame 검출을 분리합니다.
- 향후 Adapter와 Codec을 추가해도 애플리케이션 로직을 변경하지 않도록 합니다.
의존성
Dreamine.Communication.Abstractions
대상 프레임워크
net8.0
관련 패키지
Dreamine.Communication.AbstractionsDreamine.Communication.CoreDreamine.Communication.SocketsDreamine.Communication.SerialDreamine.Communication.RabbitMQDreamine.Communication.FullKitDreamine.Communication.Wpf
Text Encoding 정책
Text Encoding은 외부 Raw Byte를 MessageEnvelope로 변환하거나, MessageEnvelope의 Payload를 다시 외부 Byte로 변환하는 Protocol Adapter 경계에서 처리합니다.
Encoding 옵션은 외부 바이트 기반 통신에 적용됩니다.
- TCP
- UDP
- Serial
PlainTextProtocolAdapter와 RawJsonProtocolAdapter는 UTF-8 또는 CP949 같은 외부 Text Encoding을 설정할 수 있습니다. 현대 시스템 간 통신에는 UTF-8을 권장합니다. CP949는 레거시 Windows 툴, 한글 장비, UTF-8을 보내지 않는 테스트 툴과 연동할 때 사용할 수 있습니다.
InMemoryMessageBus는 같은 프로세스 안에서 MessageEnvelope 객체를 직접 전달하므로 Text Encoding이 필요하지 않습니다. RabbitMQ도 기본 Dreamine 흐름에서는 MessageEnvelope를 UTF-8 JSON으로 직렬화하므로 별도 Encoding 옵션을 노출하지 않습니다.
라이선스
이 프로젝트는 MIT 라이선스를 따릅니다.
구조 다이어그램
classDiagram
class ConnectionClientBase {
<<abstract>>
#string _host
#int _port
+IsConnected bool
+ConnectAsync() Task
+DisconnectAsync() Task
#OnConnected() void
#OnDisconnected() void
#SendBytesAsync(byte[]) Task
#ReceiveBytesAsync() Task~byte[]~
}
class MessageClientBase~T~ {
<<abstract>>
+SendAsync(T) Task
+MessageReceived event
#DeserializeMessage(byte[]) T
#SerializeMessage(T) byte[]
}
class ReconnectPolicy {
+int MaxRetries
+TimeSpan Delay
+bool Exponential
+ShouldRetry(int) bool
+GetDelay(int) TimeSpan
}
class IConnectionClient {
<<interface>>
}
IConnectionClient <|.. ConnectionClientBase
ConnectionClientBase <|-- MessageClientBase~T~
ConnectionClientBase --> ReconnectPolicyAPI 문서
타입
\if KO 지정한 바이트 구분자로 스트림의 메시지 경계를 구분합니다. \endif \if EN Delimits message boundaries in a stream using a configured byte delimiter. \endif
\if KO Dreamine 표준 메시지 봉투와 JSON 바이트 간 변환을 수행합니다. \endif \if EN Converts between Dreamine-standard message envelopes and JSON bytes. \endif
\if KO 스트림별로 아직 프레임으로 완성되지 않은 바이트와 동기화 객체를 보관합니다. \endif \if EN Stores synchronization state and bytes that have not yet formed a complete frame for a stream. \endif
\if KO 바이트 스트림에서 완전한 메시지 프레임을 읽고 쓰는 계약입니다. \endif \if EN Defines how complete message frames are read from and written to a byte stream. \endif
\if KO 프로세스 메모리 안에서 라우트별 메시지를 발행하고 구독하는 메시지 버스입니다. \endif \if EN Provides route-based message publishing and subscription within the current process. \endif
\if KO 연결이 끊긴 동안 송신 대기 메시지를 메모리에 순서대로 보관합니다. \endif \if EN Stores pending outbound messages in memory in queue order while disconnected. \endif
\if KO 연결이 끊긴 동안 송신 메시지를 보관하고 다시 꺼내는 큐 계약입니다. \endif \if EN Defines a queue that retains and retrieves outbound messages while disconnected. \endif
\if KO 를 사용해 메시지 봉투를 UTF-8 JSON으로 변환합니다. \endif \if EN Converts message envelopes to and from UTF-8 JSON using . \endif
\if KO 4바이트 빅 엔디언 길이 접두사로 메시지 프레임을 구분합니다. \endif \if EN Frames messages with a four-byte big-endian length prefix. \endif
\if KO 생성과 페이로드 변환을 위한 편의 기능을 제공합니다. \endif \if EN Provides convenience methods for creating message envelopes and converting their payloads. \endif
\if KO 메시지 라우트와 비동기 처리기를 하나의 등록 정보로 묶습니다. \endif \if EN Associates a message route with an asynchronous message handler. \endif
\if KO 메시지 라우트별로 등록된 비동기 처리기를 실행하는 기본 라우터입니다. \endif \if EN Provides a default router that invokes asynchronous handlers registered by message route. \endif
\if KO 외부 일반 텍스트 데이터와 Dreamine 메시지 봉투를 상호 변환합니다. \endif \if EN Converts between external plain-text data and Dreamine message envelopes. \endif
\if KO 일반 텍스트 프로토콜 어댑터의 인코딩과 메시지 메타데이터를 구성합니다. \endif \if EN Configures encoding and message metadata for the plain-text protocol adapter. \endif
\if KO 연결이 끊긴 동안 큐에 보관되는 송신 대기 메시지와 재시도 상태를 나타냅니다. \endif \if EN Represents a pending outbound message and its retry state while disconnected. \endif
\if KO 현재 수신 가능한 바이트를 즉시 하나의 원시 메시지 프레임으로 처리합니다. \endif \if EN Treats the bytes currently available for reading as one raw message frame. \endif
\if KO 고정 스키마가 없는 외부 JSON을 Dreamine 메시지 봉투로 감싸고 다시 송신 데이터로 변환합니다. \endif \if EN Wraps schema-free external JSON in Dreamine message envelopes and converts it back for transmission. \endif
\if KO 원시 JSON 프로토콜 어댑터의 인코딩과 기본 메시지 메타데이터를 구성합니다. \endif \if EN Configures encoding and default message metadata for the raw JSON protocol adapter. \endif
\if KO 재연결 정책의 지수 백오프 설정으로 재시도 대기 시간을 계산합니다. \endif \if EN Calculates retry delays from the exponential-backoff settings of a reconnection policy. \endif
\if KO 내부 메시지 전송 계층에 자동 재연결, 지수 백오프 및 연결 끊김 송신 큐를 추가합니다. \endif \if EN Adds automatic reconnection, exponential backoff, and disconnected-send queueing to an inner message transport. \endif
\if KO 메시지 전송 계층을 발행·구독 메시지 버스로 사용할 수 있게 변환합니다. \endif \if EN Adapts a message transport for use as a publish-subscribe message bus. \endif
DelimiterMessageFrameCodec
\if KO CRLF, UTF-8 및 1MiB 제한을 사용하는 코덱을 초기화합니다. \endif \if EN Initializes a codec using CRLF, UTF-8, and a 1 MiB limit. \endif
\if KO 구분자, 인코딩 및 최대 프레임 길이를 지정하여 코덱을 초기화합니다. \endif \if EN Initializes the codec with a delimiter, encoding, and maximum frame length. \endif
delimiter— \if KO 메시지 끝을 표시할 문자열입니다. \endif \if EN The string that marks the end of a message. \endifencoding— \if KO 구분자를 바이트로 변환할 인코딩입니다. \endif \if EN The encoding used to convert the delimiter to bytes. \endifmaxFrameLength— \if KO 구분자를 제외한 최대 프레임 바이트 수입니다. \endif \if EN The maximum frame size in bytes, excluding the delimiter. \endif\if KO 현재 프레임이 구성된 구분자 바이트로 끝나는지 확인합니다. \endif \if EN Determines whether the current frame ends with the configured delimiter bytes. \endif
frame— \if KO 끝부분을 검사할 프레임입니다. \endif \if EN The frame whose ending is inspected. \endif반환: \if KO 구분자로 끝나면 입니다. \endif \if EN when the frame ends with the delimiter. \endif
\if KO 구분자까지의 바이트를 하나의 프레임으로 비동기 읽습니다. \endif \if EN Asynchronously reads bytes through the next delimiter as one frame. \endif
stream— \if KO 읽을 스트림입니다. \endif \if EN The source stream. \endifcancellationToken— \if KO 읽기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe read cancellation. \endif반환: \if KO 구분자를 제외한 프레임이며, 데이터 없이 스트림이 끝나면 입니다. \endif \if EN The frame without its delimiter, or when the stream ends without data. \endif
\if KO 스트림별 대기 버퍼의 바이트를 소비해 완전한 구분자 프레임 생성을 시도합니다. \endif \if EN Consumes bytes from a per-stream pending buffer and attempts to produce a complete delimited frame. \endif
readBuffer— \if KO 아직 처리하지 않은 바이트가 저장된 버퍼입니다. \endif \if EN The buffer containing bytes not yet processed. \endifframe— \if KO 현재 조립 중인 프레임 바이트입니다. \endif \if EN The frame bytes currently being assembled. \endifresult— \if KO 완성된 경우 구분자를 제외한 프레임이며, 아니면 입니다. \endif \if EN The completed frame without its delimiter, or when incomplete. \endif반환: \if KO 완전한 프레임을 만들었으면 입니다. \endif \if EN when a complete frame was produced. \endif
\if KO 페이로드와 구분자를 차례로 스트림에 비동기 기록합니다. \endif \if EN Asynchronously writes the payload followed by the delimiter. \endif
stream— \if KO 기록할 스트림입니다. \endif \if EN The destination stream. \endifpayload— \if KO 구분자 앞에 기록할 메시지 데이터입니다. \endif \if EN The message data written before the delimiter. \endifcancellationToken— \if KO 쓰기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe write cancellation. \endif반환: \if KO 비동기 프레임 쓰기 작업입니다. \endif \if EN A task representing the asynchronous frame write. \endif
\if KO delimiter 값을 보관합니다. \endif \if EN Stores the delimiter value. \endif
\if KO max Frame Length 값을 보관합니다. \endif \if EN Stores the max frame length value. \endif
\if KO read Buffers 값을 보관합니다. \endif \if EN Stores the read buffers value. \endif
DreamineEnvelopeProtocolAdapter
\if KO 기본 JSON 직렬화기로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with the default JSON serializer. \endif
\if KO 지정한 메시지 직렬화기로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with the specified message serializer. \endif
serializer— \if KO 메시지 봉투를 변환할 직렬화기입니다. \endif \if EN The serializer used to convert message envelopes. \endif\if KO Dreamine 메시지 봉투 JSON을 내부 메시지로 역직렬화합니다. \endif \if EN Deserializes Dreamine message-envelope JSON into an internal message. \endif
payload— \if KO 수신한 메시지 봉투 JSON 바이트입니다. \endif \if EN The received message-envelope JSON bytes. \endif반환: \if KO 역직렬화된 Dreamine 표준 메시지입니다. \endif \if EN The deserialized Dreamine-standard message. \endif
\if KO 내부 메시지를 Dreamine 표준 JSON 바이트로 직렬화합니다. \endif \if EN Serializes an internal message to Dreamine-standard JSON bytes. \endif
message— \if KO 직렬화할 메시지입니다. \endif \if EN The message to serialize. \endif반환: \if KO 송신할 Dreamine 표준 JSON 바이트입니다. \endif \if EN Dreamine-standard JSON bytes ready for transmission. \endif
\if KO serializer 값을 보관합니다. \endif \if EN Stores the serializer value. \endif
FrameReadBuffer
\if KO 다음 프레임 해석에서 이어서 처리할 수신 바이트 큐를 가져옵니다. \endif \if EN Gets the received-byte queue to resume processing during the next frame decode. \endif
\if KO 대기 바이트 큐에 대한 동시 접근을 직렬화하는 동기화 객체를 가져옵니다. \endif \if EN Gets the synchronization object that serializes access to the pending-byte queue. \endif
IMessageFrameCodec
\if KO 스트림에서 하나의 완전한 메시지 프레임을 비동기적으로 읽습니다. \endif \if EN Asynchronously reads one complete message frame from a stream. \endif
stream— \if KO 프레임을 읽을 읽기 가능한 스트림입니다. \endif \if EN The readable stream from which the frame is read. \endifcancellationToken— \if KO 비동기 읽기 작업의 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the asynchronous read. \endif반환: \if KO 프레임에서 추출한 메시지 데이터이며, 데이터 없이 스트림이 끝나면 입니다. \endif \if EN The message data extracted from the frame, or when the stream ends without data. \endif
\if KO 하나의 메시지 페이로드를 프레임 형식으로 스트림에 비동기 기록합니다. \endif \if EN Asynchronously writes one message payload to a stream using the codec's frame format. \endif
stream— \if KO 프레임을 기록할 쓰기 가능한 스트림입니다. \endif \if EN The writable stream to which the frame is written. \endifpayload— \if KO 프레임에 포함할 메시지 데이터입니다. \endif \if EN The message data to include in the frame. \endifcancellationToken— \if KO 비동기 쓰기 작업의 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the asynchronous write. \endif반환: \if KO 비동기 프레임 쓰기 작업입니다. \endif \if EN A task that represents the asynchronous frame write. \endif
InMemoryMessageBus
\if KO 메모리 메시지 버스를 연결 상태로 전환합니다. \endif \if EN Transitions the in-memory message bus to the connected state. \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 completed task representing the connection operation. \endif
\if KO 메모리 메시지 버스를 연결 해제 상태로 전환합니다. \endif \if EN Transitions the in-memory message bus to the disconnected state. \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 completed task representing the disconnection operation. \endif
\if KO 등록된 처리기를 제거하고 버스를 연결 해제 상태로 전환합니다. \endif \if EN Clears registered handlers and transitions the bus to the disconnected state. \endif \if KO 완료된 비동기 해제 작업입니다. \endif \if EN A completed value task representing asynchronous disposal. \endif
\if KO 메시지 라우트에 등록된 모든 처리기에 메시지를 비동기적으로 발행합니다. \endif \if EN Asynchronously publishes a message to every handler registered for its route. \endif
message— \if KO 발행할 메시지입니다. \endif \if EN The message to publish. \endifcancellationToken— \if KO 처리기 실행 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel handler execution. \endif반환: \if KO 등록된 처리기의 비동기 실행 작업입니다. \endif \if EN A task representing asynchronous execution of the registered handlers. \endif
\if KO 지정한 라우트에 비동기 메시지 처리기를 등록합니다. \endif \if EN Registers an asynchronous message handler 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 delegate 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 completed task representing the subscription operation. \endif
\if KO 메모리 내부 전송 방식을 가져옵니다. \endif \if EN Gets the in-memory transport kind. \endif
\if KO 메시지 버스의 현재 연결 상태를 가져옵니다. \endif \if EN Gets the current connection state of the message bus. \endif
\if KO handlers 값을 보관합니다. \endif \if EN Stores the handlers value. \endif
InMemoryOutboundMessageQueue
\if KO 지정한 용량 및 초과 처리 설정으로 메모리 큐를 초기화합니다. \endif \if EN Initializes the in-memory queue with capacity and overflow settings. \endif
options— \if KO 큐 용량과 초과 처리 설정입니다. 이면 기본값을 사용합니다. \endif \if EN The capacity and overflow settings; uses defaults. \endif\if KO 큐에 저장된 모든 메시지를 스레드 안전하게 제거합니다. \endif \if EN Removes all queued messages in a thread-safe manner. \endif
\if KO 메시지를 큐 뒤쪽에 추가하며, 설정에 따라 가득 찬 큐의 가장 오래된 항목을 제거합니다. \endif \if EN Adds a message to the back, optionally dropping the oldest item when full. \endif
message— \if KO 저장할 송신 대기 메시지입니다. \endif \if EN The pending outbound message to store. \endifcancellationToken— \if KO 추가 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel enqueueing. \endif반환: \if KO 완료된 비동기 추가 작업입니다. \endif \if EN A completed value task representing enqueueing. \endif
\if KO 재시도할 메시지를 큐 앞쪽에 다시 추가하며 필요하면 뒤쪽 항목을 제거합니다. \endif \if EN Returns a retry message to the front, dropping a back item when configured and necessary. \endif
message— \if KO 큐 앞쪽에 다시 저장할 메시지입니다. \endif \if EN The message to return to the front. \endifcancellationToken— \if KO 추가 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel enqueueing. \endif반환: \if KO 완료된 비동기 앞쪽 추가 작업입니다. \endif \if EN A completed value task representing front-enqueueing. \endif
\if KO 큐 뒤쪽에 항목을 추가할 공간을 확보하고 설정에 따라 가장 오래된 항목을 제거합니다. \endif \if EN Ensures capacity for a back insertion, dropping the oldest item when configured. \endif
\if KO 큐 앞쪽에 항목을 추가할 공간을 확보하고 설정에 따라 가장 최근 항목을 제거합니다. \endif \if EN Ensures capacity for a front insertion, dropping the newest item when configured. \endif
\if KO 큐에서 가장 오래된 메시지를 제거해 반환합니다. \endif \if EN Removes and returns the oldest queued message. \endif
cancellationToken— \if KO 꺼내기 작업 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel dequeueing. \endif반환: \if KO 제거한 메시지이며, 큐가 비어 있으면 입니다. \endif \if EN The removed message, or when empty. \endif
\if KO 현재 큐에 저장된 메시지 수를 스레드 안전하게 가져옵니다. \endif \if EN Gets the number of queued messages in a thread-safe manner. \endif
\if KO messages 값을 보관합니다. \endif \if EN Stores the messages value. \endif
\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif
\if KO sync 값을 보관합니다. \endif \if EN Stores the sync value. \endif
IOutboundMessageQueue
\if KO 큐에 저장된 모든 메시지를 제거합니다. \endif \if EN Removes all messages stored in the queue. \endif
\if KO 메시지를 큐의 뒤쪽에 비동기적으로 추가합니다. \endif \if EN Asynchronously adds a message to the back of the queue. \endif
message— \if KO 큐에 저장할 송신 대기 메시지입니다. \endif \if EN The pending outbound message to store. \endifcancellationToken— \if KO 추가 작업의 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the enqueue operation. \endif반환: \if KO 비동기 추가 작업입니다. \endif \if EN A value task that represents the asynchronous enqueue operation. \endif
\if KO 재시도할 메시지를 큐의 앞쪽에 비동기적으로 다시 추가합니다. \endif \if EN Asynchronously returns a message to the front of the queue for retry. \endif
message— \if KO 큐 앞쪽에 다시 저장할 메시지입니다. \endif \if EN The message to return to the front of the queue. \endifcancellationToken— \if KO 추가 작업의 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the enqueue operation. \endif반환: \if KO 비동기 앞쪽 추가 작업입니다. \endif \if EN A value task that represents the asynchronous front-enqueue operation. \endif
\if KO 큐에서 가장 오래된 메시지를 비동기적으로 제거해 반환합니다. \endif \if EN Asynchronously removes and returns the oldest message in the queue. \endif
cancellationToken— \if KO 꺼내기 작업의 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the dequeue operation. \endif반환: \if KO 제거한 메시지이며, 큐가 비어 있으면 입니다. \endif \if EN The removed message, or when the queue is empty. \endif
\if KO 현재 큐에 저장된 메시지 수를 가져옵니다. \endif \if EN Gets the number of messages currently stored in the queue. \endif
JsonMessageSerializer
\if KO 대소문자를 구분하지 않는 기본 JSON 옵션으로 직렬화기를 초기화합니다. \endif \if EN Initializes the serializer with default case-insensitive JSON options. \endif
\if KO 지정한 JSON 옵션으로 직렬화기를 초기화합니다. \endif \if EN Initializes the serializer with the specified JSON options. \endif
options— \if KO 직렬화와 역직렬화에 사용할 옵션입니다. \endif \if EN The options used for serialization and deserialization. \endif\if KO UTF-8 JSON 바이트를 메시지로 역직렬화합니다. \endif \if EN Deserializes UTF-8 JSON bytes into a message. \endif
data— \if KO 역직렬화할 UTF-8 JSON 바이트입니다. \endif \if EN The UTF-8 JSON bytes to deserialize. \endif반환: \if KO 역직렬화된 메시지입니다. \endif \if EN The deserialized message. \endif
\if KO 메시지를 UTF-8 JSON 바이트 배열로 직렬화합니다. \endif \if EN Serializes a message to a UTF-8 JSON byte array. \endif
message— \if KO 직렬화할 메시지입니다. \endif \if EN The message to serialize. \endif반환: \if KO 직렬화된 UTF-8 JSON 바이트입니다. \endif \if EN The serialized UTF-8 JSON bytes. \endif
\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif
LengthPrefixedMessageFrameCodec
\if KO 최대 프레임 길이 1MiB로 코덱을 초기화합니다. \endif \if EN Initializes the codec with a 1 MiB maximum frame length. \endif
\if KO 지정한 최대 프레임 길이로 코덱을 초기화합니다. \endif \if EN Initializes the codec with the specified maximum frame length. \endif
maxFrameLength— \if KO 허용할 최대 페이로드 바이트 수입니다. \endif \if EN The maximum permitted payload size in bytes. \endif\if KO 요청한 바이트 수를 모두 읽거나 스트림 종료를 만날 때까지 반복해서 읽습니다. \endif \if EN Repeatedly reads until the requested byte count is filled or the stream ends. \endif
stream— \if KO 데이터를 읽을 스트림입니다. \endif \if EN The stream to read. \endiflength— \if KO 정확히 읽을 바이트 수입니다. \endif \if EN The exact number of bytes to read. \endifcancellationToken— \if KO 읽기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe read cancellation. \endif반환: \if KO 완성된 버퍼이며, 첫 바이트 전에 스트림이 끝나면 입니다. \endif \if EN The filled buffer, or when the stream ends before the first byte. \endif
\if KO 길이 접두사와 해당 크기의 페이로드를 비동기 읽습니다. \endif \if EN Asynchronously reads a length prefix and its corresponding payload. \endif
stream— \if KO 읽을 스트림입니다. \endif \if EN The source stream. \endifcancellationToken— \if KO 읽기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe read cancellation. \endif반환: \if KO 읽은 페이로드이며, 헤더 전에 스트림이 끝나면 입니다. \endif \if EN The payload, or when the stream ends before a header. \endif
\if KO 4바이트 길이 접두사와 페이로드를 스트림에 비동기 기록합니다. \endif \if EN Asynchronously writes a four-byte length prefix and payload. \endif
stream— \if KO 기록할 스트림입니다. \endif \if EN The destination stream. \endifpayload— \if KO 프레임에 기록할 메시지 데이터입니다. \endif \if EN The message data written in the frame. \endifcancellationToken— \if KO 쓰기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe write cancellation. \endif반환: \if KO 비동기 프레임 쓰기 작업입니다. \endif \if EN A task representing the asynchronous frame write. \endif
\if KO max Frame Length 값을 보관합니다. \endif \if EN Stores the max frame length value. \endif
\if KO Header Size 값을 보관합니다. \endif \if EN Stores the header size value. \endif
MessageEnvelopeExtensions
\if KO UTF-8 문자열 페이로드를 가진 새 를 생성합니다. \endif \if EN Creates a new with a UTF-8 string payload. \endif
route— \if KO 새 메시지의 라우트입니다. \endif \if EN The route of the new message. \endifname— \if KO 새 메시지의 논리적 이름입니다. \endif \if EN The logical name of the new message. \endifpayload— \if KO UTF-8로 인코딩할 문자열입니다. 이면 빈 문자열로 처리합니다. \endif \if EN The string to encode as UTF-8; is treated as an empty string. \endif반환: \if KO 지정한 라우트, 이름 및 페이로드를 가진 새 메시지입니다. \endif \if EN A new message with the specified route, name, and payload. \endif
\if KO 메시지의 이진 페이로드를 UTF-8 문자열로 변환합니다. \endif \if EN Converts a message's binary payload to a UTF-8 string. \endif
message— \if KO 페이로드를 읽을 메시지입니다. \endif \if EN The message whose payload is read. \endif반환: \if KO UTF-8로 디코딩한 페이로드 문자열입니다. \endif \if EN The payload decoded as a UTF-8 string. \endif
MessageHandlerRegistration
\if KO 지정한 라우트와 처리기로 을 초기화합니다. \endif \if EN Initializes a with the specified route and handler. \endif
route— \if KO 처리기가 수신할 메시지 라우트입니다. \endif \if EN The message route received by the handler. \endifhandler— \if KO 메시지를 처리할 비동기 대리자입니다. \endif \if EN The asynchronous delegate that processes a message. \endif\if KO 등록된 비동기 메시지 처리기를 가져옵니다. \endif \if EN Gets the registered asynchronous message handler. \endif
\if KO 등록된 메시지 라우트를 가져옵니다. \endif \if EN Gets the registered message route. \endif
MessageRouter
\if KO 모든 라우트에서 등록된 메시지 처리기를 제거합니다. \endif \if EN Removes every registered message handler from all routes. \endif
\if KO 지정한 라우트에 비동기 메시지 처리기를 등록합니다. \endif \if EN Registers an asynchronous message handler for a route. \endif
route— \if KO 처리기를 연결할 라우트입니다. \endif \if EN The route to associate with the handler. \endifhandler— \if KO 메시지를 처리할 비동기 대리자입니다. \endif \if EN The asynchronous delegate that processes messages. \endif\if KO 메시지 라우트에 등록된 모든 처리기를 순서대로 비동기 실행합니다. \endif \if EN Asynchronously invokes all handlers registered for the message route in registration order. \endif
message— \if KO 라우팅할 메시지입니다. \endif \if EN The message to route. \endifcancellationToken— \if KO 처리기 실행 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel handler execution. \endif반환: \if KO 모든 일치 처리기의 비동기 실행 작업입니다. \endif \if EN A task representing asynchronous execution of all matching handlers. \endif
\if KO 지정한 라우트에서 특정 메시지 처리기를 제거합니다. \endif \if EN Removes a specific message handler from a route. \endif
route— \if KO 처리기가 등록된 라우트입니다. \endif \if EN The route on which the handler is registered. \endifhandler— \if KO 제거할 처리기입니다. \endif \if EN The handler to remove. \endif반환: \if KO 처리기를 찾아 제거했으면 입니다. \endif \if EN when the handler was found and removed. \endif
\if KO handlers 값을 보관합니다. \endif \if EN Stores the handlers value. \endif
PlainTextProtocolAdapter
\if KO 기본 일반 텍스트 설정으로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with default plain-text settings. \endif
\if KO 인코딩과 메시지 메타데이터를 지정하여 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with an encoding and message metadata. \endif
encoding— \if KO 외부 텍스트 송수신에 사용할 인코딩입니다. \endif \if EN The encoding used for external text input and output. \endifroute— \if KO 디코딩한 메시지에 지정할 라우트입니다. \endif \if EN The route assigned to decoded messages. \endifname— \if KO 디코딩한 메시지에 지정할 이름입니다. \endif \if EN The name assigned to decoded messages. \endif\if KO 지정한 일반 텍스트 설정으로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with the specified plain-text options. \endif
options— \if KO 인코딩과 메시지 메타데이터 설정입니다. \endif \if EN The encoding and message metadata settings. \endif\if KO 외부 인코딩의 텍스트 바이트를 Dreamine 메시지 봉투로 변환합니다. \endif \if EN Converts externally encoded text bytes into a Dreamine message envelope. \endif
payload— \if KO 수신한 텍스트 바이트입니다. \endif \if EN The received text bytes. \endif반환: \if KO 구성된 라우트, 이름 및 텍스트 헤더를 가진 메시지입니다. \endif \if EN A message containing the configured route, name, and text headers. \endif
\if KO 메시지의 UTF-8 페이로드를 외부 인코딩의 텍스트 바이트로 변환합니다. \endif \if EN Converts a message's UTF-8 payload into externally encoded text bytes. \endif
message— \if KO 송신할 메시지입니다. \endif \if EN The message to send. \endif반환: \if KO 외부 시스템으로 송신할 텍스트 바이트입니다. \endif \if EN The text bytes to send to the external system. \endif
\if KO 디코딩한 텍스트 페이로드를 내부 UTF-8 형식으로 정규화할지 여부를 가져옵니다. \endif \if EN Gets whether decoded text payloads are normalized to the internal UTF-8 format. \endif
\if KO encoding 값을 보관합니다. \endif \if EN Stores the encoding value. \endif
\if KO name 값을 보관합니다. \endif \if EN Stores the name value. \endif
\if KO route 값을 보관합니다. \endif \if EN Stores the route value. \endif
PlainTextProtocolOptions
\if KO 표시 이름에 해당하는 엄격한 문자열 인코딩을 생성합니다. \endif \if EN Creates a strict text encoding for the specified display name. \endif
encodingName— \if KO 인코딩 표시 이름입니다. 비어 있으면 UTF-8을 사용하며 UTF-8, CP949 및 시스템 등록 인코딩을 지원합니다. \endif \if EN The encoding display name; empty values use UTF-8, while UTF-8, CP949, and system-registered encodings are supported. \endif반환: \if KO 요청한 표시 이름에 해당하는 인코딩입니다. \endif \if EN The encoding that corresponds to the requested display name. \endif
\if KO 레거시 코드 페이지 인코딩 공급자를 프로세스에 한 번만 등록합니다. \endif \if EN Registers the legacy code-page encoding provider once per process. \endif
\if KO 외부 일반 텍스트 송수신에 사용할 문자열 인코딩을 가져옵니다. \endif \if EN Gets the text encoding used for external plain-text input and output. \endif
\if KO 디코딩할 때 생성되는 메시지의 이름을 가져옵니다. \endif \if EN Gets the name assigned to messages created during decoding. \endif
\if KO 디코딩한 문자열 페이로드를 Dreamine 내부 표준 UTF-8로 정규화할지 여부를 가져옵니다. \endif \if EN Gets whether decoded text payloads are normalized to Dreamine's internal UTF-8 format. \endif
\if KO 디코딩할 때 생성되는 메시지의 라우트를 가져옵니다. \endif \if EN Gets the route assigned to messages created during decoding. \endif
\if KO is Code Page Provider Registered 값을 보관합니다. \endif \if EN Stores the is code page provider registered value. \endif
\if KO 한국어 Windows ANSI 코드 페이지 949의 표시 이름입니다. \endif \if EN The display name for Korean Windows ANSI code page 949. \endif
\if KO UTF-8 인코딩의 표준 표시 이름입니다. \endif \if EN The standard display name for UTF-8 encoding. \endif
QueuedOutboundMessage
\if KO 현재 시각에 처음 큐에 들어온 메시지로 를 초기화합니다. \endif \if EN Initializes a as a first-time enqueue at the current time. \endif
message— \if KO 보관할 메시지입니다. \endif \if EN The message to retain. \endif\if KO 저장 시각과 재시도 정보를 지정하여 를 초기화합니다. \endif \if EN Initializes a with enqueue and retry information. \endif
message— \if KO 보관할 메시지입니다. \endif \if EN The message to retain. \endifenqueuedAt— \if KO 메시지가 처음 큐에 저장된 시각입니다. \endif \if EN The time at which the message was first enqueued. \endifattemptCount— \if KO 지금까지 수행한 전송 시도 횟수입니다. \endif \if EN The number of send attempts made so far. \endiflastError— \if KO 마지막 전송 실패 메시지입니다. \endif \if EN The error message from the most recent send failure. \endif\if KO 지정한 최대 보관 시간과 현재 시각을 기준으로 메시지의 만료 여부를 확인합니다. \endif \if EN Determines whether the message has expired for a maximum age and current time. \endif
maxAge— \if KO 허용할 최대 보관 시간입니다. 이면 만료되지 않습니다. \endif \if EN The maximum allowed age; disables expiration. \endifnow— \if KO 만료 계산에 사용할 현재 시각입니다. \endif \if EN The current time used for the expiration calculation. \endif반환: \if KO 최대 보관 시간을 초과했으면 , 아니면 입니다. \endif \if EN when the maximum age is exceeded; otherwise, . \endif
\if KO 전송 시도 횟수와 마지막 오류를 갱신한 새 큐 메시지를 생성합니다. \endif \if EN Creates a new queued message with an updated attempt count and last error. \endif
exception— \if KO 마지막 전송 실패를 나타내는 예외입니다. \endif \if EN The exception that represents the most recent send failure. \endif반환: \if KO 실패 정보가 반영된 새 큐 메시지입니다. \endif \if EN A new queued message containing the failure information. \endif
\if KO 전송 시도 횟수를 가져옵니다. \endif \if EN Gets the number of send attempts. \endif
\if KO 메시지가 처음 큐에 저장된 시각을 가져옵니다. \endif \if EN Gets the time at which the message was first enqueued. \endif
\if KO 마지막 전송 실패 메시지를 가져옵니다. \endif \if EN Gets the most recent send error message. \endif
\if KO 보관된 메시지를 가져옵니다. \endif \if EN Gets the retained message. \endif
RawAvailableMessageFrameCodec
\if KO 기본 8KiB 수신 버퍼로 코덱을 초기화합니다. \endif \if EN Initializes the codec with the default 8 KiB receive buffer. \endif
\if KO 지정한 수신 버퍼 크기로 코덱을 초기화합니다. \endif \if EN Initializes the codec with the specified receive buffer size. \endif
bufferSize— \if KO 한 번의 읽기에 사용할 최대 버퍼 바이트 수입니다. \endif \if EN The maximum buffer size in bytes used for one read. \endif\if KO 스트림에서 현재 수신 가능한 데이터를 한 번 읽어 하나의 프레임으로 반환합니다. \endif \if EN Performs one read and returns the currently available data as a single frame. \endif
stream— \if KO 읽을 스트림입니다. \endif \if EN The source stream. \endifcancellationToken— \if KO 읽기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe read cancellation. \endif반환: \if KO 읽은 바이트이며, 스트림이 종료되면 입니다. \endif \if EN The bytes read, or when the stream has ended. \endif
\if KO 길이 또는 구분자를 추가하지 않고 페이로드를 그대로 비동기 기록합니다. \endif \if EN Asynchronously writes the payload without adding a length or delimiter. \endif
stream— \if KO 기록할 스트림입니다. \endif \if EN The destination stream. \endifpayload— \if KO 그대로 기록할 메시지 데이터입니다. \endif \if EN The message data written unchanged. \endifcancellationToken— \if KO 쓰기 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe write cancellation. \endif반환: \if KO 비동기 쓰기 작업입니다. \endif \if EN A task representing the asynchronous write. \endif
\if KO buffer Size 값을 보관합니다. \endif \if EN Stores the buffer size value. \endif
RawJsonProtocolAdapter
\if KO 기본 원시 JSON 설정으로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with default raw JSON settings. \endif
\if KO 기본 라우트와 이름을 지정하여 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with a default route and name. \endif
defaultRoute— \if KO JSON에서 라우트를 찾지 못할 때 사용할 값입니다. \endif \if EN The value used when no route is found in JSON. \endifdefaultName— \if KO JSON에서 이름을 찾지 못할 때 사용할 값입니다. \endif \if EN The value used when no name is found in JSON. \endif\if KO 외부 인코딩과 기본 메시지 메타데이터로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with an external encoding and default message metadata. \endif
encoding— \if KO 외부 JSON 송수신에 사용할 인코딩입니다. \endif \if EN The encoding used for external JSON input and output. \endifdefaultRoute— \if KO 라우트 추출 실패 시 사용할 값입니다. \endif \if EN The route used when extraction fails. \endifdefaultName— \if KO 이름 추출 실패 시 사용할 값입니다. \endif \if EN The name used when extraction fails. \endif\if KO 지정한 원시 JSON 설정으로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with the specified raw JSON options. \endif
options— \if KO 인코딩과 기본 메시지 메타데이터 설정입니다. \endif \if EN The encoding and default message metadata settings. \endif\if KO 원시 JSON을 분석하여 라우트와 이름을 가진 메시지 봉투로 변환합니다. \endif \if EN Parses raw JSON into a message envelope with an extracted route and name. \endif
payload— \if KO 수신한 외부 JSON 바이트입니다. \endif \if EN The received external JSON bytes. \endif반환: \if KO JSON 페이로드와 추출한 메타데이터를 가진 메시지입니다. \endif \if EN A message containing the JSON payload and extracted metadata. \endif
\if KO 메시지 페이로드 또는 메타데이터를 외부 인코딩의 JSON 바이트로 변환합니다. \endif \if EN Converts a message payload or its metadata into externally encoded JSON bytes. \endif
message— \if KO 송신할 메시지입니다. \endif \if EN The message to send. \endif반환: \if KO 외부 시스템으로 송신할 JSON 바이트입니다. \endif \if EN The JSON bytes to send to the external system. \endif
\if KO JSON 루트에서 지정한 속성을 찾아 문자열 표현으로 반환합니다. \endif \if EN Finds a property on the JSON root and returns its string representation. \endif
root— \if KO 검색할 JSON 루트 요소입니다. \endif \if EN The JSON root element to search. \endifpropertyName— \if KO 찾을 속성 이름입니다. \endif \if EN The property name to find. \endif반환: \if KO 속성의 문자열 값이며, 속성이 없으면 입니다. \endif \if EN The property's string value, or when absent. \endif
\if KO 디코딩한 JSON 페이로드를 내부 UTF-8 형식으로 정규화할지 여부를 가져옵니다. \endif \if EN Gets whether decoded JSON payloads are normalized to the internal UTF-8 format. \endif
\if KO default Name 값을 보관합니다. \endif \if EN Stores the default name value. \endif
\if KO default Route 값을 보관합니다. \endif \if EN Stores the default route value. \endif
\if KO encoding 값을 보관합니다. \endif \if EN Stores the encoding value. \endif
RawJsonProtocolOptions
\if KO JSON에서 이름을 추출하지 못했을 때 사용할 기본 메시지 이름을 가져옵니다. \endif \if EN Gets the default message name used when no name can be extracted from JSON. \endif
\if KO JSON에서 라우트를 추출하지 못했을 때 사용할 기본 라우트를 가져옵니다. \endif \if EN Gets the default route used when no route can be extracted from JSON. \endif
\if KO 외부 원시 JSON 송수신에 사용할 문자열 인코딩을 가져옵니다. \endif \if EN Gets the text encoding used for external raw JSON input and output. \endif
\if KO 디코딩한 JSON 페이로드를 Dreamine 내부 표준 UTF-8로 정규화할지 여부를 가져옵니다. \endif \if EN Gets whether decoded JSON payloads are normalized to Dreamine's internal UTF-8 format. \endif
ReconnectDelayCalculator
\if KO 지정한 정책으로 를 초기화합니다. \endif \if EN Initializes a with the specified policy. \endif
policy— \if KO 대기 시간 계산에 사용할 정책입니다. 이면 기본 정책을 사용합니다. \endif \if EN The policy used to calculate delays; uses the default policy. \endif\if KO 지정한 재시도 횟수에 적용할 대기 시간을 계산합니다. \endif \if EN Calculates the delay to apply for the specified retry attempt. \endif
attemptCount— \if KO 1부터 시작하는 재시도 횟수입니다. 1 이하의 값은 최초 대기 시간으로 처리합니다. \endif \if EN The one-based retry attempt; values of one or less use the initial delay. \endif반환: \if KO 1밀리초 이상이며 정책의 최대 대기 시간을 넘지 않는 계산 결과입니다. \endif \if EN The calculated delay, at least one millisecond and no greater than the policy maximum. \endif
\if KO 대기 시간을 최소 1밀리초의 양수 값으로 정규화합니다. \endif \if EN Normalizes a delay to a positive value of at least one millisecond. \endif
delay— \if KO 정규화할 대기 시간입니다. \endif \if EN The delay to normalize. \endif반환: \if KO 정규화된 양수 대기 시간입니다. \endif \if EN The normalized positive delay. \endif
\if KO policy 값을 보관합니다. \endif \if EN Stores the policy value. \endif
ResilientMessageTransport
\if KO 내부 전송 계층과 선택적 복원·큐 설정으로 전송 계층을 초기화합니다. \endif \if EN Initializes the transport with an inner transport and optional resilience and queue settings. \endif
innerTransport— \if KO 실제 연결과 송수신을 담당할 전송 계층입니다. \endif \if EN The transport responsible for the physical connection and message transfer. \endifreconnectPolicy— \if KO 재연결 간격과 횟수를 제어할 정책입니다. \endif \if EN The policy controlling reconnection intervals and attempts. \endifqueueOptions— \if KO 연결 끊김 송신 처리와 큐 제한 설정입니다. \endif \if EN The disconnected-send behavior and queue limits. \endifoutboundQueue— \if KO 사용자 지정 송신 큐이며, 이면 메모리 큐를 생성합니다. \endif \if EN A custom outbound queue; creates an in-memory queue. \endif\if KO 내부 연결과 필요 시 백그라운드 재연결 루프를 시작합니다. \endif \if EN Starts the inner connection and, when enabled, the background reconnection loop. \endif
cancellationToken— \if KO 최초 연결과 큐 전송 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe cancellation of the initial connection and queue flush. \endif반환: \if KO 비동기 연결 및 초기 큐 처리 작업입니다. \endif \if EN A task representing connection and initial queue processing. \endif
\if KO 최소 양수 시간 동안 대기하고 정상적인 취소 예외를 내부에서 처리합니다. \endif \if EN Delays for a positive duration and handles normal cancellation internally. \endif
delay— \if KO 대기할 시간입니다. \endif \if EN The duration to wait. \endifcancellationToken— \if KO 대기 취소 토큰입니다. \endif \if EN A token used to cancel the delay. \endif반환: \if KO 안전한 비동기 대기 작업입니다. \endif \if EN A task representing the safe asynchronous delay. \endif
\if KO 자동 재연결을 중지하고 내부 연결을 종료합니다. \endif \if EN Stops automatic reconnection and disconnects the inner transport. \endif
cancellationToken— \if KO 연결 해제 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe disconnection cancellation. \endif반환: \if KO 비동기 연결 해제 작업입니다. \endif \if EN A task representing asynchronous disconnection. \endif
\if KO 재연결 루프를 중지하고 내부 전송 계층과 동기화 리소스를 비동기 해제합니다. \endif \if EN Stops the reconnection loop and asynchronously releases the inner transport and synchronization resources. \endif \if KO 비동기 리소스 해제 작업입니다. \endif \if EN A value task representing asynchronous resource disposal. \endif
\if KO 자동 재연결이 활성화된 경우 복원 루프가 하나만 실행되도록 보장합니다. \endif \if EN Ensures that exactly one resilience loop runs when automatic reconnection is enabled. \endif
\if KO 연결된 동안 만료되지 않은 송신 대기 메시지를 순서대로 전송합니다. \endif \if EN Sends non-expired queued messages in order while connected. \endif
cancellationToken— \if KO 큐 전송 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe queue-flush cancellation. \endif반환: \if KO 비동기 큐 전송 작업입니다. \endif \if EN A task representing the asynchronous queue flush. \endif
\if KO 연결 끊김 송신 정책에 따라 실패, 큐 저장 또는 연결 대기 후 송신을 수행합니다. \endif \if EN Applies the disconnected-send policy by failing, queueing, or waiting to send. \endif
message— \if KO 처리할 송신 메시지입니다. \endif \if EN The outbound message to process. \endifcancellationToken— \if KO 비동기 처리 취소 토큰입니다. \endif \if EN A token used to cancel asynchronous processing. \endif반환: \if KO 정책 처리 작업입니다. \endif \if EN A task representing policy processing. \endif
\if KO 지정한 상태가 메시지 송신 가능한 연결 또는 수신 대기 상태인지 확인합니다. \endif \if EN Determines whether a state is connected or listening and therefore operational. \endif
state— \if KO 검사할 연결 상태입니다. \endif \if EN The connection state to inspect. \endif반환: \if KO 동작 가능한 상태이면 입니다. \endif \if EN when the state is operational. \endif
\if KO 현재 송신 큐 개수로 큐 변경 이벤트를 발생시킵니다. \endif \if EN Raises the queue-count event with the current outbound queue size. \endif
\if KO 마지막 알림 이후 유효 연결 상태가 바뀐 경우에만 상태 변경 이벤트를 발생시킵니다. \endif \if EN Raises the state-change event only when the effective state changed since the last notification. \endif
\if KO 내부 수신 이벤트를 현재 전송 계층의 수신 이벤트로 다시 발생시킵니다. \endif \if EN Re-raises an inner receive event through this transport. \endif
sender— \if KO 내부 이벤트 발생 객체이며 사용하지 않습니다. \endif \if EN The inner event sender; it is not used. \endifmessage— \if KO 수신한 메시지입니다. \endif \if EN The received message. \endif\if KO 연결 감시, 재연결 백오프 및 큐 전송을 수행하는 백그라운드 루프를 실행합니다. \endif \if EN Runs the background loop for connection monitoring, reconnection backoff, and queue flushing. \endif
cancellationToken— \if KO 루프 종료를 요청하는 토큰입니다. \endif \if EN A token used to request loop termination. \endif반환: \if KO 복원 루프 작업입니다. \endif \if EN A task representing the resilience loop. \endif
\if KO 연결 상태와 끊김 송신 정책에 따라 즉시 전송하거나 큐에 저장합니다. \endif \if EN Sends immediately or queues the message according to connection state and policy. \endif
message— \if KO 전송할 메시지입니다. \endif \if EN The message to send. \endifcancellationToken— \if KO 송신 또는 큐 저장 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe cancellation of sending or queueing. \endif반환: \if KO 비동기 송신 또는 큐 저장 작업입니다. \endif \if EN A task representing asynchronous sending or queueing. \endif
\if KO 수동 연결 해제 요청 플래그를 스레드 안전하게 설정합니다. \endif \if EN Sets the manual-disconnection flag in a thread-safe manner. \endif
value— \if KO 설정할 플래그 값입니다. \endif \if EN The flag value to set. \endif\if KO 복원 루프 실행 요청 플래그를 스레드 안전하게 설정합니다. \endif \if EN Sets the resilience-loop request flag in a thread-safe manner. \endif
value— \if KO 설정할 플래그 값입니다. \endif \if EN The flag value to set. \endif\if KO 전송 계층이 이미 해제되었으면 예외를 발생시킵니다. \endif \if EN Throws when the transport has already been disposed. \endif
\if KO 복원 루프를 시작하고 내부 전송 계층이 연결될 때까지 비동기 대기합니다. \endif \if EN Starts the resilience loop and asynchronously waits for the inner transport to connect. \endif
cancellationToken— \if KO 대기 취소 토큰입니다. \endif \if EN A token used to cancel waiting. \endif반환: \if KO 연결 대기 작업입니다. \endif \if EN A task representing the connection wait. \endif
\if KO 호출자가 수동 연결 해제를 요청했는지 스레드 안전하게 확인합니다. \endif \if EN Gets, in a thread-safe manner, whether the caller requested manual disconnection. \endif
\if KO 연결 복원 루프 실행이 요청되었는지 스레드 안전하게 확인합니다. \endif \if EN Gets, in a thread-safe manner, whether execution of the connection-resilience loop was requested. \endif
\if KO 내부 전송 계층의 전송 방식을 가져옵니다. \endif \if EN Gets the transport kind of the inner transport. \endif
\if KO 현재 송신 대기 큐에 저장된 메시지 수를 가져옵니다. \endif \if EN Gets the number of messages currently waiting in the outbound queue. \endif
\if KO 내부 상태와 재연결 루프를 반영한 현재 유효 연결 상태를 가져옵니다. \endif \if EN Gets the effective connection state derived from the inner state and reconnection loop. \endif
\if KO delay Calculator 값을 보관합니다. \endif \if EN Stores the delay calculator value. \endif
\if KO disposed 값을 보관합니다. \endif \if EN Stores the disposed value. \endif
\if KO dispose Guard 값을 보관합니다. \endif \if EN Stores the dispose guard value. \endif
\if KO flush Lock 값을 보관합니다. \endif \if EN Stores the flush lock value. \endif
\if KO inner Transport 값을 보관합니다. \endif \if EN Stores the inner transport value. \endif
\if KO last Notified State 값을 보관합니다. \endif \if EN Stores the last notified state value. \endif
\if KO lifetime Cts 값을 보관합니다. \endif \if EN Stores the lifetime cts value. \endif
\if KO loop Sync 값을 보관합니다. \endif \if EN Stores the loop sync value. \endif
\if KO manual Disconnect Requested 값을 보관합니다. \endif \if EN Stores the manual disconnect requested value. \endif
\if KO notify Sync 값을 보관합니다. \endif \if EN Stores the notify sync value. \endif
\if KO outbound Queue 값을 보관합니다. \endif \if EN Stores the outbound queue value. \endif
\if KO queue Options 값을 보관합니다. \endif \if EN Stores the queue options value. \endif
\if KO reconnect Policy 값을 보관합니다. \endif \if EN Stores the reconnect policy value. \endif
\if KO resilience Loop Requested 값을 보관합니다. \endif \if EN Stores the resilience loop requested value. \endif
\if KO resilience Loop Task 값을 보관합니다. \endif \if EN Stores the resilience loop task value. \endif
\if KO 내부 전송 계층이 메시지를 수신했을 때 발생합니다. \endif \if EN Occurs when the inner transport receives a message. \endif
\if KO 송신 대기 큐의 메시지 수가 변경될 때 발생합니다. \endif \if EN Occurs when the number of queued outbound messages changes. \endif
\if KO 복원 동작을 반영한 유효 연결 상태가 변경될 때 발생합니다. \endif \if EN Occurs when the effective connection state, including resilience activity, changes. \endif
TransportMessageBusAdapter
\if KO 지정한 메시지 전송 계층으로 어댑터를 초기화합니다. \endif \if EN Initializes the adapter with the specified message transport. \endif
transport— \if KO 연결과 송수신을 담당할 내부 전송 계층입니다. \endif \if EN The inner transport responsible for connection and message transfer. \endif\if KO 내부 전송 계층에 비동기적으로 연결합니다. \endif \if EN Asynchronously connects the inner transport. \endif
cancellationToken— \if KO 연결 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the connection. \endif반환: \if KO 내부 전송 계층의 비동기 연결 작업입니다. \endif \if EN The asynchronous connection task returned by the inner transport. \endif
\if KO 내부 전송 계층의 연결을 비동기적으로 해제합니다. \endif \if EN Asynchronously disconnects the inner transport. \endif
cancellationToken— \if KO 연결 해제 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel disconnection. \endif반환: \if KO 내부 전송 계층의 비동기 연결 해제 작업입니다. \endif \if EN The asynchronous disconnection task returned by the inner transport. \endif
\if KO 이벤트 구독을 해제하고 내부 전송 계층의 비동기 해제를 대기하지 않고 시작합니다. \endif \if EN Detaches event subscriptions and starts disposal of the inner transport without awaiting it. \endif
\if KO 이벤트 구독과 내부 전송 계층 리소스를 비동기적으로 해제합니다. \endif \if EN Asynchronously releases event subscriptions and inner-transport resources. \endif \if KO 비동기 해제 작업입니다. \endif \if EN A value task representing asynchronous disposal. \endif
\if KO 내부 전송 계층에서 수신한 메시지를 해당 라우트에 등록된 처리기들에게 비동기적으로 전달합니다. \endif \if EN Asynchronously dispatches a message received from the inner transport to handlers registered for its route. \endif
sender— \if KO 메시지 수신 이벤트를 발생시킨 객체입니다. 이 구현에서는 사용하지 않습니다. \endif \if EN The object that raised the receive event; this implementation does not use it. \endifmessage— \if KO 등록된 처리기들에게 전달할 수신 메시지입니다. \endif \if EN The received message to dispatch to registered handlers. \endif\if KO 내부 전송 계층을 통해 메시지를 비동기적으로 발행합니다. \endif \if EN Asynchronously publishes a message through the inner transport. \endif
message— \if KO 발행할 메시지입니다. \endif \if EN The message to publish. \endifcancellationToken— \if KO 발행 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel publishing. \endif반환: \if KO 내부 전송 계층의 비동기 송신 작업입니다. \endif \if EN The asynchronous send task returned by the inner transport. \endif
\if KO 지정한 라우트에 비동기 메시지 처리기를 등록합니다. \endif \if EN Registers an asynchronous message handler for the specified route. \endif
route— \if KO 구독할 라우트입니다. \endif \if EN The route to subscribe to. \endifhandler— \if KO 수신 메시지를 처리할 비동기 대리자입니다. \endif \if EN The asynchronous delegate that processes received messages. \endifcancellationToken— \if KO 구독 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe requests to cancel the subscription. \endif반환: \if KO 완료된 비동기 구독 작업입니다. \endif \if EN A completed task representing the subscription operation. \endif
\if KO 내부 전송 계층의 전송 방식을 가져옵니다. \endif \if EN Gets the transport kind of the inner transport. \endif
\if KO 메시지 처리기에서 예상하지 못한 예외가 발생할 때 호출할 콜백을 가져오거나 설정합니다. 기본값은 입니다. \endif \if EN Gets or sets the callback invoked when a message handler throws an unexpected exception; the default is . \endif
\if KO 내부 전송 계층의 현재 연결 상태를 가져옵니다. \endif \if EN Gets the current connection state of the inner transport. \endif
\if KO handlers 값을 보관합니다. \endif \if EN Stores the handlers value. \endif
\if KO transport 값을 보관합니다. \endif \if EN Stores the transport value. \endif