RabbitMQ

Today lolol·2022년 12월 14일
0

panda editor로 에디팅 중에 사진을 넣고 저장하니 .md 파일로 저장이 안되서, preview를 볼 수 있도록 작성하는 글

rabbitmq는 메세지 브로커로서 큐를 관리하고 메세지 송/수신에 관여하는 역할을 합니다.

사진에서 producer라고 칭하는 것은 publisher라고 불리기도 합니다.

그림에서 볼 수 있듯이, producerconsumer는 굉장히 낮은 커플링으로 연결되어 있는 것을 볼 수 있습니다.
producerconsumer는 같은 프로그래밍 언어로 구현되어야 하는 것이 아니며, producer는 웹서버 그리고 consumer는 워커 애플리케이션이 될 수도 있습니다.

또한 그림에서 볼 수 있듯이, 메세지는 바로 큐에 들어가는 것이 아닙니다. exchange를 통해서 전달됩니다.

Concept

  • Producer: 메세지를 보내는 애플리케이션
  • Consumer: 메세지는 받는 애플리케이션
  • Queue: 메세지를 저장하는 버퍼
  • Message: Information that is sent from the producer to a consumer through RabbitMQ.
  • Connection: 애플리케이션(producer or consumer)와 RabbitMQ broker 사이의 TCP 연결
  • Channel: Connection 내의 가상의 연결. 큐에서 메세지를 보내거나 받을 때 - it’s all done over a channel (무슨 말인지 모르겠음.)
  • Exchange: Producer에게 메세지를 받고 그것들을 큐로 보낼 때 기반하는 규칙을 exchange type이라고 합니다. To receive messages, a queue needs to be bound to at least one exchange.
  • Binding: 큐와 exchange 사이의 링크
  • Routing key: A key that the exchange looks at to decide how to route the message to queues. Think of the routing key like an address for the message. (잘번역 못하겠다)
  • AMQP: Advanced Message Queuing Protocol is the protocol used by RabbitMQ for messaging.
  • Users: It is possible to connect to RabbitMQ with a given username and password. Every user can be assigned permissions such as rights to read, write and configure privileges within the instance. Users can also be assigned permissions for specific virtual hosts.
  • Vhost, virtual host: Provides a way to segregate applications using the same RabbitMQ instance. Different users can have different permissions to different vhost and queues and exchanges can be created, so they only exist in one vhost.

References

profile
working making doing makes us 🤖

0개의 댓글