๊ฐœ๋ฐœ.log/rabbitMQ

[RabbitMQ] rabbitmq ๊ตฌ์„ฑ ํŒŒ์ผ / rabbitmq.config ์™€ rabbitmq.conf ์ฐจ์ด / ๊ตฌ์„ฑ ํŒŒ์ผ ์˜ค๋ฅ˜ / advanced.config

๊ฐœ๋ฐœํ•˜๋Š” ์ฃผ๋””์”จ 2023. 4. 18. 14:52

rabbitMq๋ฅผ ์„ค์น˜ํ•˜์˜€์œผ๋‚˜ manager ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ•˜๋ฉด server๊ฐ€ ์ค‘๋‹จ๋˜๊ณ , server๋ฅผ ์‹คํ–‰์‹œํ‚ค๋ฉด ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ๋™์ž‘ํ•˜์ง€ ์•Š๋Š” ์‹ ๊ธฐํ•œ ํ˜„์ƒ์„ ๋งŒ๋“ค์–ด๋‚ด๋ฉฐ ์‚ฝ์งˆํ•˜๊ณ  ์žˆ๋‹ค.. ์ œ๋ฐœ ์ด์ƒํ•œ ๊ฒƒ ์ข€ ๊ทธ๋งŒ ๋งŒ๋“ค์–ด๋‚ด๊ณ  ์ด์ œ ์‹คํ–‰ ์ข€ ๋˜์—ˆ์œผ๋ฉด ์ข‹๊ฒ ๋‹ค. ๋‹ค๋ฅธ ํฌ์ŠคํŒ…์„ ๋ณด๋ฉด ํ•œ๋ฒˆ์— ์ž˜ ๋˜๋Š” ๊ณผ์ •๋งŒ ๋‚˜์™€์žˆ๊ณ  ์‚ฝ์งˆํ•œ ๊ณผ์ •์€ ์ฐพ์„ ์ˆ˜๊ฐ€ ์—†์—ˆ๋‹ค. ๋˜ ์˜๋ฌธ์œผ๋กœ ๋œ ํฌ์ŠคํŒ…์ด ๊ทธ๋‚˜๋งˆ ์žˆ์—ˆ์ง€๋งŒ ๊ทธ ๋˜ํ•œ ๋ช…์พŒํ•œ ํ•ด๋‹ต์ด ๋˜์ง„ ๋ชปํ–ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋ฒˆ์—๋„ rabbitMq ์ดˆ์‹ฌ์ž๋กœ์„œ ์‚ฝ์งˆ ํ–ˆ๋˜ ๊ณผ์ •์„ ๋‚จ๊ฒจ๋ณด๊ณ ์ž ํ•œ๋‹ค. rabbitMq๋ฅผ ๋ง‰์—ฐํžˆ ๊ณต๋ถ€ํ•˜๋ฉด์„œ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•˜๋‹ˆ ์ด๊ฒƒ์ €๊ฒƒ ์•Œ์•„๊ฐ€๋Š”๊ฒŒ ์‰ฝ์ง„ ์•Š์€๊ณผ์ •์ธ ๊ฒƒ ๊ฐ™๋‹ค.

๋”ฐ๋ผ์„œ ํฌ์ŠคํŒ… ๊ณผ์ •์—์„œ ์ž˜๋ชป๋œ ์ •๋ณด๊ฐ€ ์žˆ์„ ์ˆ˜๋„ ์žˆ์œผ๋‹ˆ ์–ธ์ œ๋“  ๋Œ“๊ธ€๋กœ ๋‚จ๊ฒจ์ฃผ์‹œ๋ฉด ๋ฐฐ์›Œ๊ฐ€๊ฒ ์Šต๋‹ˆ๋‹ค :)

 

*rabbitMq ๊ธฐ๋ณธ์„ค์ •ํŒŒ์ผ ์˜ˆ์‹œ : rabbitmq.config

# rabbitmq.conf

# ์„ค์ • ํŒŒ์ผ ๋ฒ„์ „ (ํ•„์ˆ˜)
# (๋‹ค๋ฅธ ๋ฒ„์ „์ด ํ˜„์žฌ ์„ค์ • ํŒŒ์ผ๋ณด๋‹ค ๋†’์€ ๊ฒฝ์šฐ ์ด ํŒŒ์ผ์ด ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค)
# (ํ˜„์žฌ ๋ฒ„์ „์€ 3.7.7์ž…๋‹ˆ๋‹ค)
# (ํŒŒ์ผ์— ๋ฒ„์ „์ด ์ง€์ •๋˜์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด 3.7.7๋กœ ๊ฐ„์ฃผ๋ฉ๋‹ˆ๋‹ค)
version = 3.7.7

# loopback_users.guest = false ๋ผ๊ณ  ์„ค์ •๋œ ๊ฒฝ์šฐ ์•„๋ž˜์™€ ๊ฐ™์ด ์„ค์ •
default_user = guest
default_pass = guest

# ๋กœ๊น… ์„ค์ •
log.dir = /var/log/rabbitmq
log.file = rabbitmq.log
log.file.rotation = daily
log.file.rotation.keep_count = 7

# ํด๋Ÿฌ์Šคํ„ฐ ์ด๋ฆ„ ์„ค์ •
cluster.name = rabbit@node1

# ๋””์Šคํฌ ๋…ธ๋“œ ์„ค์ •
disk_free_limit.absolute = 1GB
disk_free_limit.relative = 1.0

# ๋ฐฐํฌ ๋ชจ๋“œ ์„ค์ •
# ๋ฐฐํฌ ๋ชจ๋“œ๋Š” "single", "classic" ๋˜๋Š” "multi" ์ค‘ ํ•˜๋‚˜ ์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
# (๊ธฐ๋ณธ๊ฐ’์€ "single")
distribution.mode = single

# management plugin ์„ค์ •
management.listener.port = 15672
management.listener.ssl = false
management.tcp.ip = 0.0.0.0
management.tcp.port = 15671

 

RabbitMQ์—์„œ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ rabbitmq.config ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋ฉฐ rabbitmq.conf ํŒŒ์ผ์€ ์˜ˆ์ „ ๋ฒ„์ „์—์„œ ์‚ฌ์šฉ๋˜๋˜ ํŒŒ์ผ์ด๋‹ค. ๋งŒ์•ฝ rabbitmq.config ํŒŒ์ผ์ด ์กด์žฌํ•œ๋‹ค๋ฉด, ํ•ด๋‹น ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋ฉฐ rabbitmq.conf ํŒŒ์ผ์€ ๋ฌด์‹œ๋œ๋‹ค. ๋”ฐ๋ผ์„œ rabbitmq.config ํŒŒ์ผ๋งŒ ์ž‘์„ฑํ•ด๋‘์–ด๋„ ์ถฉ๋ถ„ํ•˜๋‹ค. ๋˜ ํ•˜๋‚˜์˜ ๊ตฌ์„ฑ ํŒŒ์ผ์ธ advanced.config ํŒŒ์ผ์€ rabbitmq.conf ํŒŒ์ผ๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉ๋˜๋Š” Erlang ์–ธ์–ด๋กœ ์ž‘์„ฑ๋œ ๊ตฌ์„ฑ ํŒŒ์ผ์ด๋ฉฐ, ์ฃผ๋กœ RabbitMQ์—์„œ ๊ณ ๊ธ‰ ๊ตฌ์„ฑ์„ ๊ตฌ์„ฑํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋œ๋‹ค.

์ผ๋ฐ˜์ ์œผ๋กœ rabbitmq.conf ํŒŒ์ผ๋งŒ์œผ๋กœ ์ถฉ๋ถ„ํ•˜๋ฉฐ, advanced.config ํŒŒ์ผ์€ ๊ณ ๊ธ‰ ๊ตฌ์„ฑ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ์—๋งŒ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค. ๋งŒ์•ฝ ๋‘˜ ๋‹ค ์ž‘์„ฑํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด, RabbitMQ๋Š” rabbitmq.conf ํŒŒ์ผ์„ ์šฐ์„ ์œผ๋กœ ์ ์šฉํ•œ๋‹ค.

 

rabbitMq ์„œ๋ฒ„ ์˜ค๋ฅ˜์— ์‚ฝ์งˆํ•˜๊ณ  Erlang ์˜ค๋ฅ˜์— ์‚ฝ์งˆํ•˜๋ฉด์„œ ๊นจ๋‹ฌ์€ ๊ฑด ์ •๋ง ํŠน์ดํ•œ ์ผ€์ด์Šค๊ฐ€ ์•„๋‹ˆ๊ณ ์„œ๋Š” ๊ตฌ์„ฑ ํŒŒ์ผ ์˜ค๋ฅ˜๋Š” rabbitMq ๋ฒ„์ „๊ณผ Erlang ๋ฒ„์ „์ด ์•ˆ๋งž๊ธฐ ๋•Œ๋ฌธ์— ์ƒ๊ธฐ๋Š” ์˜ค๋ฅ˜์ด๋‹ค. ์นœ์ ˆํ•˜๊ฒŒ ๋ฒ„์ „์ด ์•ˆ๋งž๋‹ค๊ณ  ์•Œ๋ ค์ฃผ๋ฉด ์ข‹๊ฒ ์ง€๋งŒ ๊ตฌ์„ฑํŒŒ์ผ์ด ์•ˆ๋งž๊ฑฐ๋‚˜ ์—†๋‹ค๊ณ  ์˜ค๋ฅ˜๋ฅผ ์•Œ๋ ค์ฃผ๋‹ˆ..^^.. ์ดํ•ดํ•˜๊ธฐ ๋„ˆ๋ฌด ์–ด๋ ค์šด ๊ฒƒ ๊ฐ™๋‹ค.