iconDreamine
← 목록

Dreamine.Communication.RabbitMQ

stablev1.0.1

RabbitMQ 메시지 브로커 통합 — Exchange/Queue/Routing 추상화.

#broker#communication#dreamine#messagebus#messaging#rabbitmq
TFM net8.0Package Dreamine.Communication.RabbitMQ참조 Dreamine.Communication.Abstractions

Dreamine.Communication.RabbitMQ

Dreamine.Communication.RabbitMQ는 Dreamine Communication 패키지 제품군의 RabbitMQ 어댑터 패키지입니다.

이 패키지는 Dreamine Communication의 공통 메시지 계약인 MessageEnvelope를 RabbitMQ의 Exchange, Queue, RoutingKey 기반 Publish/Subscribe 메시징 구조와 연결하는 IMessageBus 구현체를 제공합니다.

➡️ English Version

설명

Dreamine Communication을 위한 RabbitMQ 메시지 버스 어댑터입니다.

이 패키지는 RabbitMQ를 선택 가능한 Broker 기반 메시지 버스로 통합하되, 상위 애플리케이션 레이어는 Dreamine.Communication.Abstractions에만 의존하도록 유지합니다.

주요 기능

  • RabbitMQ 기반 IMessageBus 구현
  • RabbitMQ 연결 생명주기 관리
  • RabbitMQ Exchange, Queue, RoutingKey 기반 Publish / Subscribe 지원
  • MessageEnvelope JSON 직렬화 및 역직렬화
  • RabbitMQ 토폴로지 선언
    • Exchange
    • Queue
    • Queue Binding
  • RabbitMQ 옵션 모델
  • RabbitMQ 전용 통신 예외 타입
  • Communication Monitor 샘플 연동
  • Docker RabbitMQ 서버 기반 검증 시나리오 지원

패키지 역할

Dreamine.Communication.Abstractions
    ↑
Dreamine.Communication.RabbitMQ

Dreamine.Communication.RabbitMQ는 추상화 계약에 의존하며, RabbitMQ에 대한 구체 구현을 제공합니다.

애플리케이션 코드는 RabbitMQ 구현체에 직접 의존하지 말고, IMessageBus, MessageEnvelope, 공통 통신 계약에 의존하는 구조를 유지해야 합니다.

주요 구성 요소

RabbitMqMessageBus

RabbitMqMessageBusIMessageBus를 구현합니다.

책임:

  • RabbitMQ 서버 연결
  • Exchange, Queue, Queue Binding 토폴로지 선언
  • MessageEnvelope 메시지 발행
  • 지정 Route 구독 및 수신 메시지 Handler 전달
  • RabbitMQ Connection / Channel 생명주기 관리
  • ConnectionState 계약 기반 연결 상태 관리

RabbitMqMessageBusOptions

RabbitMQ 연결 및 라우팅 설정을 정의합니다.

대표 필드:

  • HostName
  • Port
  • VirtualHost
  • UserName
  • Password
  • ExchangeName
  • QueueName
  • RoutingKey

RabbitMqCommunicationException

RabbitMQ 통신 레이어에서 발생하는 오류를 표현하기 위한 전용 예외 타입입니다.

기본 사용 예시

using Dreamine.Communication.Abstractions.Models;
using Dreamine.Communication.RabbitMQ.Buses;
using Dreamine.Communication.RabbitMQ.Options;

var bus = new RabbitMqMessageBus(
    new RabbitMqMessageBusOptions
    {
        HostName = "localhost",
        Port = 5672,
        VirtualHost = "/",
        UserName = "guest",
        Password = "guest",
        ExchangeName = "dreamine.default.exchange",
        QueueName = "dreamine.default.queue",
        RoutingKey = "dreamine.default.route"
    });

await bus.ConnectAsync();

await bus.SubscribeAsync(
    "dreamine.default.route",
    async (message, cancellationToken) =>
    {
        var text = System.Text.Encoding.UTF8.GetString(message.Payload);
        Console.WriteLine(text);
        await Task.CompletedTask;
    });

await bus.PublishAsync(
    new MessageEnvelope
    {
        Name = "RabbitMQ.Publish",
        Route = "dreamine.default.route",
        Payload = System.Text.Encoding.UTF8.GetBytes("test"),
        Headers = new Dictionary<string, string>
        {
            ["ContentType"] = "text/plain",
            ["Protocol"] = "RabbitMQ"
        }
    });

await bus.DisconnectAsync();

RabbitMQ 테스트 서버

로컬 검증은 Docker로 RabbitMQ를 실행하는 방식이 가장 간단합니다.

docker run -d --name dreamine-rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

RabbitMQ Management UI:

http://localhost:15672

기본 계정:

guest / guest

샘플 설정:

Host        localhost
Port        5672
VirtualHost /
User        guest
Password    guest
Exchange    dreamine.default.exchange
Queue       dreamine.default.queue
RoutingKey  dreamine.default.route

검증된 시나리오

RabbitMQ 어댑터는 Dreamine Communication 샘플에서 검증되었습니다.

검증 흐름:

Connect
→ Subscribe
→ Publish
→ Receive
→ Monitor SEND / RECV 로그 확인

검증 항목:

  • RabbitMQ Docker 컨테이너 실행
  • RabbitMQ Management UI 접속
  • RabbitMQ 연결
  • Exchange / Queue / RoutingKey 토폴로지 선언
  • 메시지 발행
  • 구독 Handler를 통한 메시지 수신
  • MessageEnvelope JSON 직렬화 및 역직렬화
  • Communication Monitor 채널 상태 갱신
  • Communication Monitor SEND / RECV 메시지 로그 기록

설계 원칙

  • Broker 전용 구현은 상위 레이어로 누출하지 않습니다.
  • Dreamine.Communication.Abstractions 계약에 의존합니다.
  • 패키지 책임을 작고 명확하게 유지합니다.
  • 단방향 의존성 흐름을 유지합니다.
  • RabbitMQ는 선택 가능하고 교체 가능한 어댑터로 유지합니다.
  • 애플리케이션 로직은 RabbitMQ 세부 구현을 몰라도 IMessageBus만으로 동작해야 합니다.
  • RabbitMQ.Client 타입이 애플리케이션 레벨 코드로 누출되지 않게 합니다.

의존성

  • Dreamine.Communication.Abstractions
  • RabbitMQ.Client

외부 라이선스 안내

이 패키지는 RabbitMQ.Client를 사용합니다.

RabbitMQ.Client는 아래 라이선스의 Dual License 구조입니다.

  • Apache License 2.0
  • Mozilla Public License 2.0

이 패키지는 RabbitMQ.Client를 Apache License 2.0 조건으로 사용합니다.

대상 프레임워크

net8.0

관련 패키지

  • Dreamine.Communication.Abstractions
  • Dreamine.Communication.Core
  • Dreamine.Communication.Sockets
  • Dreamine.Communication.Serial
  • Dreamine.Communication.RabbitMQ
  • Dreamine.Communication.FullKit
  • Dreamine.Communication.Wpf

라이선스

이 프로젝트는 MIT License를 따릅니다.

구조 다이어그램

classDiagram
    class RabbitMqBroker {
        -IConnection _connection
        -IModel _channel
        +PublishAsync(string, object) Task
        +SubscribeAsync(string, Action~object~) Task~IDisposable~
        +DeclareQueue(string) void
        +DeclareExchange(string, ExchangeType) void
    }
    class RabbitMqOptions {
        +string Host
        +int Port
        +string VirtualHost
        +string Username
        +string Password
        +bool AutoReconnect
    }
    class RabbitMqConsumer~T~ {
        +string QueueName
        +MessageReceived event
        +StartConsuming() void
        +StopConsuming() void
    }
    class RabbitMqPublisher~T~ {
        +string ExchangeName
        +string RoutingKey
        +PublishAsync(T) Task
    }
    class IMessageBroker {
        <<interface>>
    }
    IMessageBroker <|.. RabbitMqBroker
    RabbitMqBroker --> RabbitMqOptions
    RabbitMqBroker --> RabbitMqConsumer~T~
    RabbitMqBroker --> RabbitMqPublisher~T~

API 문서

타입

IRabbitMqBasicProperties

\if KO 브로커 없이 메시지 버스를 테스트할 수 있도록 RabbitMQ 메시지 속성을 추상화합니다. \endif \if EN Abstracts RabbitMQ message properties so the bus can be tested without a broker. \endif

IRabbitMqChannel

\if KO 메시지 버스가 토폴로지, 발행, 소비 및 확인에 사용하는 최소 RabbitMQ 채널 계약입니다. \endif \if EN Defines the minimal RabbitMQ channel contract used for topology, publishing, consumption, and acknowledgements. \endif

IRabbitMqConnection

\if KO 메시지 버스가 사용하는 최소 RabbitMQ 연결 계약입니다. \endif \if EN Defines the minimal RabbitMQ connection contract used by the message bus. \endif

IRabbitMqConnectionFactory

\if KO Dreamine RabbitMQ 설정에서 브로커 연결을 생성하는 계약입니다. \endif \if EN Defines creation of broker connections from Dreamine RabbitMQ options. \endif

RabbitMqClientBasicProperties

\if KO Rabbit Mq Client Basic Properties 기능과 관련 상태를 캡슐화합니다. \endif \if EN Encapsulates rabbit mq client basic properties functionality and related state. \endif

RabbitMqClientChannel

\if KO Rabbit Mq Client Channel 기능과 관련 상태를 캡슐화합니다. \endif \if EN Encapsulates rabbit mq client channel functionality and related state. \endif

RabbitMqClientConnection

\if KO Rabbit Mq Client Connection 기능과 관련 상태를 캡슐화합니다. \endif \if EN Encapsulates rabbit mq client connection functionality and related state. \endif

RabbitMqClientConnectionFactory

\if KO RabbitMQ.Client 라이브러리로 실제 브로커 연결을 생성합니다. \endif \if EN Creates real broker connections backed by RabbitMQ.Client. \endif

RabbitMqCommunicationException

\if KO RabbitMQ 연결, 토폴로지 또는 메시지 처리 과정에서 발생한 통신 오류를 나타냅니다. \endif \if EN Represents a communication error raised during RabbitMQ connection, topology, or message processing. \endif

RabbitMqDelivery

\if KO RabbitMQ 채널 어댑터에서 메시지 버스로 전달되는 브로커 배달 정보를 나타냅니다. \endif \if EN Represents broker delivery data passed from the RabbitMQ channel adapter to the message bus. \endif

RabbitMqMessageBus

\if KO RabbitMQ Exchange, Queue 및 라우팅 키를 사용하는 메시지 버스입니다. \endif \if EN Provides a message bus using RabbitMQ exchanges, queues, and routing keys. \endif

RabbitMqMessageBusOptions

\if KO RabbitMQ 연결, 토폴로지, 발행 및 오류 처리 동작을 구성합니다. \endif \if EN Configures RabbitMQ connection, topology, publishing, and error-handling behavior. \endif

IRabbitMqBasicProperties

ContentType Property

\if KO 메시지 콘텐츠 형식을 가져오거나 설정합니다. \endif \if EN Gets or sets the message content type. \endif

Persistent Property

\if KO 브로커가 메시지를 영속화할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the broker persists the message. \endif

Type Property

\if KO 논리적 메시지 형식을 가져오거나 설정합니다. \endif \if EN Gets or sets the logical message type. \endif

IRabbitMqChannel

BasicAck Method

\if KO 배달 메시지의 성공 처리를 확인합니다. \endif \if EN Acknowledges successful processing of a delivery. \endif \if KO 확인할 배달 태그입니다. \endif \if EN The delivery tag to acknowledge. \endif \if KO 이전 태그까지 함께 확인할지 여부입니다. \endif \if EN Whether to acknowledge all tags up to this one. \endif

BasicCancel Method

\if KO 지정한 소비자를 취소합니다. \endif \if EN Cancels the specified consumer. \endif \if KO 취소할 소비자 태그입니다. \endif \if EN The consumer tag to cancel. \endif

BasicConsume Method

\if KO Queue의 배달 메시지를 처리하는 비동기 소비자를 시작합니다. \endif \if EN Starts an asynchronous consumer for deliveries from a queue. \endif \if KO 소비할 Queue입니다. \endif \if EN The queue to consume. \endif \if KO 자동 확인 여부입니다. \endif \if EN Whether deliveries are acknowledged automatically. \endif \if KO 배달 메시지를 처리할 비동기 콜백입니다. \endif \if EN The asynchronous callback that processes deliveries. \endif \if KO 생성된 소비자 태그입니다. \endif \if EN The generated consumer tag. \endif

BasicNack Method

\if KO 배달 메시지의 처리 실패를 확인합니다. \endif \if EN Negatively acknowledges a failed delivery. \endif \if KO 실패 확인할 배달 태그입니다. \endif \if EN The delivery tag to reject. \endif \if KO 이전 태그까지 함께 처리할지 여부입니다. \endif \if EN Whether to include all tags up to this one. \endif \if KO 메시지를 Queue에 다시 넣을지 여부입니다. \endif \if EN Whether to requeue the message. \endif

BasicPublish Method

\if KO 메시지 본문과 속성을 지정한 Exchange 및 라우팅 키로 발행합니다. \endif \if EN Publishes a body and properties to an exchange with a routing key. \endif \if KO 대상 Exchange입니다. \endif \if EN The target exchange. \endif \if KO 발행 라우팅 키입니다. \endif \if EN The publishing routing key. \endif \if KO 라우팅 실패 시 반환을 요구할지 여부입니다. \endif \if EN Whether unroutable messages must be returned. \endif \if KO 메시지 속성입니다. \endif \if EN The message properties. \endif \if KO 발행할 메시지 본문입니다. \endif \if EN The message body to publish. \endif

BasicReject Method

\if KO 단일 배달 메시지를 거부합니다. \endif \if EN Rejects a single delivery. \endif \if KO 거부할 배달 태그입니다. \endif \if EN The delivery tag to reject. \endif \if KO 메시지를 Queue에 다시 넣을지 여부입니다. \endif \if EN Whether to requeue the message. \endif

Close Method

\if KO RabbitMQ 채널을 닫습니다. \endif \if EN Closes the RabbitMQ channel. \endif

CreateBasicProperties Method

\if KO 발행 작업에 사용할 새 메시지 속성을 생성합니다. \endif \if EN Creates message properties for a publish operation. \endif \if KO 채널에 연결된 메시지 속성입니다. \endif \if EN Message properties associated with the channel. \endif

ExchangeDeclare Method

\if KO 지정한 형식과 수명 설정으로 Exchange를 선언합니다. \endif \if EN Declares an exchange with the specified type and lifetime settings. \endif \if KO Exchange 이름입니다. \endif \if EN The exchange name. \endif \if KO Exchange 형식입니다. \endif \if EN The exchange type. \endif \if KO 영속 선언 여부입니다. \endif \if EN Whether the exchange is durable. \endif \if KO 미사용 시 자동 삭제 여부입니다. \endif \if EN Whether the exchange is deleted when unused. \endif

QueueBind Method

\if KO 라우팅 키로 Queue를 Exchange에 바인딩합니다. \endif \if EN Binds a queue to an exchange using a routing key. \endif \if KO 바인딩할 Queue 이름입니다. \endif \if EN The queue to bind. \endif \if KO 대상 Exchange 이름입니다. \endif \if EN The target exchange. \endif \if KO 바인딩 라우팅 키입니다. \endif \if EN The binding routing key. \endif

QueueDeclare Method

\if KO 지정한 수명 및 소유권 설정으로 Queue를 선언합니다. \endif \if EN Declares a queue with the specified lifetime and ownership settings. \endif \if KO Queue 이름입니다. \endif \if EN The queue name. \endif \if KO 영속 선언 여부입니다. \endif \if EN Whether the queue is durable. \endif \if KO 현재 연결 전용 여부입니다. \endif \if EN Whether the queue is exclusive to the current connection. \endif \if KO 미사용 시 자동 삭제 여부입니다. \endif \if EN Whether the queue is deleted when unused. \endif

IsOpen Property

\if KO 채널이 현재 열려 있는지 여부를 가져옵니다. \endif \if EN Gets whether the channel is currently open. \endif

IRabbitMqConnection

Close Method

\if KO RabbitMQ 연결을 닫습니다. \endif \if EN Closes the RabbitMQ connection. \endif

CreateChannel Method

\if KO 브로커 작업에 사용할 채널을 생성합니다. \endif \if EN Creates a channel for broker operations. \endif \if KO 새 RabbitMQ 채널입니다. \endif \if EN A new RabbitMQ channel. \endif

IsOpen Property

\if KO 연결이 현재 열려 있는지 여부를 가져옵니다. \endif \if EN Gets whether the connection is currently open. \endif

IRabbitMqConnectionFactory

CreateConnection Method

\if KO 지정한 연결 및 토폴로지 설정으로 RabbitMQ 연결을 생성합니다. \endif \if EN Creates a RabbitMQ connection from the specified connection and topology options. \endif

options— \if KO RabbitMQ 연결 및 토폴로지 설정입니다. \endif \if EN The RabbitMQ connection and topology options. \endif

반환: \if KO 생성된 RabbitMQ 연결 추상화입니다. \endif \if EN The created RabbitMQ connection abstraction. \endif

RabbitMqClientBasicProperties

#ctor Method

\if KO 실제 RabbitMQ 메시지 속성을 감싸는 어댑터를 초기화합니다. \endif \if EN Initializes an adapter around RabbitMQ message properties. \endif

inner— \if KO 감쌀 실제 메시지 속성입니다. \endif \if EN The underlying message properties to wrap. \endif
ContentType Property

\if KO Content Type 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the content type value. \endif

Inner Property

\if KO 감싼 실제 RabbitMQ 메시지 속성을 가져옵니다. \endif \if EN Gets the wrapped RabbitMQ message properties. \endif

Persistent Property

\if KO Persistent 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the persistent value. \endif

Type Property

\if KO Type 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the type value. \endif

RabbitMqClientChannel

#ctor Method

\if KO 실제 RabbitMQ 채널 모델을 감싸는 어댑터를 초기화합니다. \endif \if EN Initializes an adapter around a RabbitMQ channel model. \endif

channel— \if KO 감쌀 실제 채널입니다. \endif \if EN The underlying channel to wrap. \endif
BasicAck Method

\if KO Basic Ack 작업을 수행합니다. \endif \if EN Performs the basic ack operation. \endif

deliveryTag— \if KO delivery Tag에 사용할 값입니다. \endif \if EN The value used for delivery tag. \endif
multiple— \if KO multiple에 사용할 값입니다. \endif \if EN The value used for multiple. \endif
BasicCancel Method

\if KO Basic Cancel 작업을 수행합니다. \endif \if EN Performs the basic cancel operation. \endif

consumerTag— \if KO consumer Tag에 사용할 값입니다. \endif \if EN The value used for consumer tag. \endif
BasicConsume Method

\if KO Basic Consume 작업을 수행합니다. \endif \if EN Performs the basic consume operation. \endif

queue— \if KO queue에 사용할 값입니다. \endif \if EN The value used for queue. \endif
autoAck— \if KO auto Ack에 사용할 값입니다. \endif \if EN The value used for auto ack. \endif
onReceived— \if KO on Received에 사용할 Func<RabbitMqDelivery, CancellationToken, Task> 값입니다. \endif \if EN The Func<RabbitMqDelivery, CancellationToken, Task> value used for on received. \endif

반환: \if KO Basic Consume 작업에서 생성한 결과입니다. \endif \if EN The result produced by the basic consume operation. \endif

BasicNack Method

\if KO Basic Nack 작업을 수행합니다. \endif \if EN Performs the basic nack operation. \endif

deliveryTag— \if KO delivery Tag에 사용할 값입니다. \endif \if EN The value used for delivery tag. \endif
multiple— \if KO multiple에 사용할 값입니다. \endif \if EN The value used for multiple. \endif
requeue— \if KO requeue에 사용할 값입니다. \endif \if EN The value used for requeue. \endif
BasicPublish Method

\if KO Basic Publish 작업을 수행합니다. \endif \if EN Performs the basic publish operation. \endif

exchange— \if KO exchange에 사용할 값입니다. \endif \if EN The value used for exchange. \endif
routingKey— \if KO routing Key에 사용할 값입니다. \endif \if EN The value used for routing key. \endif
mandatory— \if KO mandatory에 사용할 값입니다. \endif \if EN The value used for mandatory. \endif
properties— \if KO properties에 사용할 값입니다. \endif \if EN The value used for properties. \endif
body— \if KO body에 사용할 ReadOnlyMemory<byte> 값입니다. \endif \if EN The ReadOnlyMemory<byte> value used for body. \endif
BasicReject Method

\if KO Basic Reject 작업을 수행합니다. \endif \if EN Performs the basic reject operation. \endif

deliveryTag— \if KO delivery Tag에 사용할 값입니다. \endif \if EN The value used for delivery tag. \endif
requeue— \if KO requeue에 사용할 값입니다. \endif \if EN The value used for requeue. \endif
Close Method

\if KO Close 작업을 수행합니다. \endif \if EN Performs the close operation. \endif

CreateBasicProperties Method

\if KO Basic Properties 값을 생성합니다. \endif \if EN Creates the basic properties value. \endif

반환: \if KO Create Basic Properties 작업에서 생성한 결과입니다. \endif \if EN The result produced by the create basic properties operation. \endif

Dispose Method

\if KO 실제 채널 리소스를 해제합니다. \endif \if EN Disposes the underlying channel resources. \endif

ExchangeDeclare Method

\if KO Exchange Declare 작업을 수행합니다. \endif \if EN Performs the exchange declare operation. \endif

exchange— \if KO exchange에 사용할 값입니다. \endif \if EN The value used for exchange. \endif
type— \if KO type에 사용할 값입니다. \endif \if EN The value used for type. \endif
durable— \if KO durable에 사용할 값입니다. \endif \if EN The value used for durable. \endif
autoDelete— \if KO auto Delete에 사용할 값입니다. \endif \if EN The value used for auto delete. \endif
QueueBind Method

\if KO Queue Bind 작업을 수행합니다. \endif \if EN Performs the queue bind operation. \endif

queue— \if KO queue에 사용할 값입니다. \endif \if EN The value used for queue. \endif
exchange— \if KO exchange에 사용할 값입니다. \endif \if EN The value used for exchange. \endif
routingKey— \if KO routing Key에 사용할 값입니다. \endif \if EN The value used for routing key. \endif
QueueDeclare Method

\if KO Queue Declare 작업을 수행합니다. \endif \if EN Performs the queue declare operation. \endif

queue— \if KO queue에 사용할 값입니다. \endif \if EN The value used for queue. \endif
durable— \if KO durable에 사용할 값입니다. \endif \if EN The value used for durable. \endif
exclusive— \if KO exclusive에 사용할 값입니다. \endif \if EN The value used for exclusive. \endif
autoDelete— \if KO auto Delete에 사용할 값입니다. \endif \if EN The value used for auto delete. \endif
IsOpen Property

\if KO 실제 채널이 열려 있는지 여부를 가져옵니다. \endif \if EN Gets whether the underlying channel is open. \endif

_channel Field

\if KO channel 값을 보관합니다. \endif \if EN Stores the channel value. \endif

RabbitMqClientConnection

#ctor Method

\if KO 실제 RabbitMQ.Client 연결을 감싸는 어댑터를 초기화합니다. \endif \if EN Initializes an adapter around a RabbitMQ.Client connection. \endif

connection— \if KO 감쌀 실제 연결입니다. \endif \if EN The underlying connection to wrap. \endif
Close Method

\if KO 실제 연결을 닫습니다. \endif \if EN Closes the underlying connection. \endif

CreateChannel Method

\if KO 실제 RabbitMQ 모델을 감싸는 새 채널을 생성합니다. \endif \if EN Creates a channel wrapping a new RabbitMQ model. \endif

반환: \if KO 새 채널 어댑터입니다. \endif \if EN A new channel adapter. \endif

Dispose Method

\if KO 실제 연결 리소스를 해제합니다. \endif \if EN Disposes the underlying connection resources. \endif

IsOpen Property

\if KO 실제 연결이 열려 있는지 여부를 가져옵니다. \endif \if EN Gets whether the underlying connection is open. \endif

_connection Field

\if KO connection 값을 보관합니다. \endif \if EN Stores the connection value. \endif

RabbitMqClientConnectionFactory

CreateConnection Method

\if KO 지정한 설정으로 RabbitMQ.Client 기반 연결을 생성합니다. \endif \if EN Creates a RabbitMQ.Client-backed connection from the specified options. \endif

options— \if KO 브로커 연결 설정입니다. \endif \if EN The broker connection options. \endif

반환: \if KO 생성된 연결 어댑터입니다. \endif \if EN The created connection adapter. \endif

RabbitMqCommunicationException

#ctor Method

\if KO 기본 메시지로 새 RabbitMQ 통신 예외를 초기화합니다. \endif \if EN Initializes a new RabbitMQ communication exception with the default message. \endif

#ctor Method

\if KO 지정한 오류 메시지로 새 RabbitMQ 통신 예외를 초기화합니다. \endif \if EN Initializes a new RabbitMQ communication exception with the specified error message. \endif

message— \if KO 오류 원인을 설명하는 메시지입니다. \endif \if EN The message that describes the cause of the error. \endif
#ctor Method

\if KO 지정한 오류 메시지와 내부 예외로 새 RabbitMQ 통신 예외를 초기화합니다. \endif \if EN Initializes a new RabbitMQ communication exception with an error message and inner exception. \endif

message— \if KO 오류 원인을 설명하는 메시지입니다. \endif \if EN The message that describes the cause of the error. \endif
innerException— \if KO 현재 오류의 원인이 된 예외입니다. \endif \if EN The exception that caused the current error. \endif

RabbitMqDelivery

#ctor Method

\if KO 배달 태그, 라우팅 키 및 본문으로 새 인스턴스를 초기화합니다. \endif \if EN Initializes an instance with a delivery tag, routing key, and body. \endif

deliveryTag— \if KO 브로커 배달 태그입니다. \endif \if EN The broker delivery tag. \endif
routingKey— \if KO 배달 라우팅 키이며 이면 빈 문자열로 저장됩니다. \endif \if EN The delivery routing key; is stored as an empty string. \endif
body— \if KO 배달된 메시지 본문입니다. \endif \if EN The delivered message body. \endif
Body Property

\if KO 배달된 메시지 본문을 가져옵니다. \endif \if EN Gets the delivery body. \endif

DeliveryTag Property

\if KO 브로커 배달 태그를 가져옵니다. \endif \if EN Gets the broker delivery tag. \endif

RoutingKey Property

\if KO 배달 라우팅 키를 가져옵니다. \endif \if EN Gets the delivery routing key. \endif

RabbitMqMessageBus

#ctor Method

\if KO 기본 연결 팩토리와 지정한 설정으로 메시지 버스를 초기화합니다. \endif \if EN Initializes the message bus with the default connection factory and specified options. \endif

options— \if KO RabbitMQ 연결 및 토폴로지 설정입니다. \endif \if EN The RabbitMQ connection and topology options. \endif
#ctor Method

\if KO 설정과 사용자 지정 연결 팩토리로 메시지 버스를 초기화합니다. \endif \if EN Initializes the message bus with options and a custom connection factory. \endif

options— \if KO RabbitMQ 연결 및 토폴로지 설정입니다. \endif \if EN The RabbitMQ connection and topology options. \endif
connectionFactory— \if KO 브로커 연결을 생성할 팩토리입니다. \endif \if EN The factory used to create broker connections. \endif
Cleanup Method

\if KO 처리기와 소비자를 정리하고 채널 및 연결을 안전하게 닫아 해제합니다. \endif \if EN Clears handlers and consumers and safely closes and disposes the channel and connection. \endif

ConnectAsync Method

\if KO 브로커 연결과 채널을 생성하고 구성된 토폴로지를 선언합니다. \endif \if EN Creates the broker connection and channel and declares the configured topology. \endif

cancellationToken— \if KO 연결 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe connection cancellation. \endif

반환: \if KO 비동기 연결 작업입니다. \endif \if EN A task representing the connection operation. \endif

DeclareTopology Method

\if KO 구성된 Exchange와 Queue를 선언하고 기본 라우팅 키로 바인딩합니다. \endif \if EN Declares the configured exchange and queue and binds them with the default routing key. \endif

channel— \if KO 토폴로지를 선언할 열린 채널입니다. \endif \if EN The open channel on which topology is declared. \endif
DisconnectAsync Method

\if KO 소비자, 채널 및 브로커 연결을 정리합니다. \endif \if EN Cleans up the consumer, channel, and broker connection. \endif

cancellationToken— \if KO 연결 해제 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe disconnection cancellation. \endif

반환: \if KO 비동기 연결 해제 작업입니다. \endif \if EN A task representing the disconnection operation. \endif

DisposeAsync Method

\if KO RabbitMQ 메시지 버스 연결과 관련 리소스를 비동기적으로 해제합니다. \endif \if EN Asynchronously releases the RabbitMQ connection and related resources. \endif \if KO 비동기 리소스 해제 작업입니다. \endif \if EN A value task representing asynchronous disposal. \endif

HandleReceivedAsync Method

\if KO 브로커 배달 본문을 메시지로 역직렬화하고 라우트 처리기를 실행한 뒤 성공 또는 실패 확인을 전송합니다. \endif \if EN Deserializes a broker delivery, invokes route handlers, and sends a positive or negative acknowledgement. \endif

delivery— \if KO 처리할 RabbitMQ 배달 정보입니다. \endif \if EN The RabbitMQ delivery to process. \endif
cancellationToken— \if KO 처리기 실행 취소 토큰입니다. \endif \if EN A token used to cancel handler execution. \endif

반환: \if KO 비동기 배달 처리 작업입니다. \endif \if EN A task representing asynchronous delivery processing. \endif

PublishAsync Method

\if KO 메시지를 JSON으로 직렬화하여 구성된 Exchange와 라우팅 키로 발행합니다. \endif \if EN Serializes a message as JSON and publishes it to the configured exchange and routing key. \endif

message— \if KO 발행할 메시지입니다. \endif \if EN The message to publish. \endif
cancellationToken— \if KO 발행 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe publishing cancellation. \endif

반환: \if KO 비동기 발행 작업입니다. \endif \if EN A task representing the publish operation. \endif

SubscribeAsync Method

\if KO 라우팅 키를 Queue에 바인딩하고 비동기 처리기를 등록합니다. \endif \if EN Binds a routing key to the queue and registers an asynchronous handler. \endif

route— \if KO 구독할 라우팅 키입니다. \endif \if EN The routing key to subscribe to. \endif
handler— \if KO 수신 메시지 처리기입니다. \endif \if EN The received-message handler. \endif
cancellationToken— \if KO 구독 취소 요청을 감시하는 토큰입니다. \endif \if EN A token used to observe subscription cancellation. \endif

반환: \if KO 비동기 구독 작업입니다. \endif \if EN A task representing the subscription operation. \endif

ValidateOptions Method

\if KO 필수 RabbitMQ 연결 및 토폴로지 설정과 포트 범위를 검증합니다. \endif \if EN Validates required RabbitMQ connection and topology values and the port range. \endif

options— \if KO 검증할 메시지 버스 설정입니다. \endif \if EN The message bus options to validate. \endif
Kind Property

\if KO RabbitMQ 전송 방식을 가져옵니다. \endif \if EN Gets the RabbitMQ transport kind. \endif

State Property

\if KO 메시지 버스의 현재 연결 상태를 가져옵니다. \endif \if EN Gets the current connection state of the message bus. \endif

_channel Field

\if KO channel 값을 보관합니다. \endif \if EN Stores the channel value. \endif

_connection Field

\if KO connection 값을 보관합니다. \endif \if EN Stores the connection value. \endif

_connectionFactory Field

\if KO connection Factory 값을 보관합니다. \endif \if EN Stores the connection factory value. \endif

_consumerTag Field

\if KO consumer Tag 값을 보관합니다. \endif \if EN Stores the consumer tag value. \endif

_handlers Field

\if KO handlers 값을 보관합니다. \endif \if EN Stores the handlers value. \endif

_options Field

\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif

_syncRoot Field

\if KO sync Root 값을 보관합니다. \endif \if EN Stores the sync root value. \endif

RabbitMqMessageBusOptions

AutoDelete Property

\if KO 미사용 시 Exchange와 Queue를 자동 삭제할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the exchange and queue are automatically deleted when unused. \endif

Durable Property

\if KO Exchange와 Queue를 영속 항목으로 선언할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the exchange and queue are declared durable. \endif

ExchangeName Property

\if KO 선언하고 사용할 Exchange 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the exchange name to declare and use. \endif

ExchangeType Property

\if KO Exchange 형식을 가져오거나 설정합니다. \endif \if EN Gets or sets the exchange type. \endif

Exclusive Property

\if KO Queue를 현재 연결 전용으로 선언할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the queue is exclusive to the current connection. \endif

HostName Property

\if KO RabbitMQ 브로커 호스트 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the RabbitMQ broker host name. \endif

Password Property

\if KO 브로커 인증 비밀번호를 가져오거나 설정합니다. \endif \if EN Gets or sets the broker authentication password. \endif

PersistentMessages Property

\if KO 발행 메시지를 브로커 영속 메시지로 표시할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether published messages are marked as persistent. \endif

Port Property

\if KO RabbitMQ 브로커 포트를 가져오거나 설정합니다. \endif \if EN Gets or sets the RabbitMQ broker port. \endif

QueueName Property

\if KO 선언하고 사용할 Queue 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the queue name to declare and use. \endif

RequeueOnHandlerError Property

\if KO 처리기 실패 시 메시지를 Queue에 다시 넣을지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether a message is requeued after handler failure. \endif

RoutingKey Property

\if KO 기본 바인딩 및 발행 라우팅 키를 가져오거나 설정합니다. \endif \if EN Gets or sets the default binding and publishing routing key. \endif

UserName Property

\if KO 브로커 인증 사용자 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the broker authentication user name. \endif

VirtualHost Property

\if KO RabbitMQ 가상 호스트를 가져오거나 설정합니다. \endif \if EN Gets or sets the RabbitMQ virtual host. \endif