RabbitMQ Sink 커넥터

RabbitMQ Sink 커넥터

RabbitMQ sink 커넥터는 Pulsar 토픽에서 메시지를 가져와 RabbitMQ 큐에 저장하는 커넥터예요. Pulsar의 데이터를 RabbitMQ로 전달할 때 사용해요.

참고: 모든 Pulsar 커넥터는 download page에서 내려받을 수 있어요.

출처: 문서

본문

구성 (Configuration)

RabbitMQ sink 커넥터의 구성에는 다음과 같은 프로퍼티가 있어요.

프로퍼티 (Property)

이름 타입 필수 기본값 설명
connectionName String true (빈 문자열) 연결 이름이에요.
host String true (빈 문자열) RabbitMQ 호스트예요.
port int true 5672 RabbitMQ 포트예요.
virtualHost String true / RabbitMQ에 연결하는 데 사용하는 가상 호스트(virtual host)예요.
username String false guest RabbitMQ에 인증하는 데 사용하는 사용자 이름이에요.
password String false guest RabbitMQ에 인증하는 데 사용하는 비밀번호예요.
queueName String true (빈 문자열) 메시지를 읽거나 써야 하는 RabbitMQ 큐 이름이에요.
requestedChannelMax int false 0 처음 요청하는 최대 채널 수예요. 0이면 무제한이에요.
requestedFrameMax int false 0 처음 요청하는 최대 프레임 크기(옥텟)예요. 0이면 무제한이에요.
connectionTimeout int false 60000 TCP 연결 설정 타임아웃(밀리초)이에요. 0이면 무한이에요.
handshakeTimeout int false 10000 AMQP0-9-1 프로토콜 핸드셰이크 타임아웃(밀리초)이에요.
requestedHeartbeat int false 60 요청하는 하트비트 타임아웃(초)이에요.
exchangeName String true (빈 문자열) 메시지를 발행할 익스체인지예요.
routingKey String true (빈 문자열) 메시지를 발행하는 데 사용하는 라우팅 키예요.

예제 (Example)

RabbitMQ sink 커넥터를 사용하기 전에 다음 방법 중 하나로 구성 파일을 만들어야 해요.

  • JSON
{
   "configs": {
      "host": "localhost",
      "port": "5672",
      "virtualHost": "/",
      "username": "guest",
      "password": "guest",
      "queueName": "test-queue",
      "connectionName": "test-connection",
      "requestedChannelMax": "0",
      "requestedFrameMax": "0",
      "connectionTimeout": "60000",
      "handshakeTimeout": "10000",
      "requestedHeartbeat": "60",
      "exchangeName": "test-exchange",
      "routingKey": "test-key"
   }
}
  • YAML
configs:
    host: "localhost"
    port: 5672
    virtualHost: "/"
    username: "guest"
    password: "guest"
    queueName: "test-queue"
    connectionName: "test-connection"
    requestedChannelMax: 0
    requestedFrameMax: 0
    connectionTimeout: 60000
    handshakeTimeout: 10000
    requestedHeartbeat: 60
    exchangeName: "test-exchange"
    routingKey: "test-key"

더 알아보기 (Learn more)