최신판 |
당신의 편집 |
1번째 줄: |
1번째 줄: |
| {{다른뜻|(amqp-cli) amqp-consume}}
| |
| ==개요== | | ==개요== |
| ;amqp-consume | | ;amqp-consume |
| ;/usr/bin/amqp-consume | | ;/usr/bin/amqp-consume |
| * AMQP 서버 상의 큐에서 메시지를 소비하는 명령어 | | * AMQP 서버 상의 큐에서 메시지를 소비하는 명령어 |
| * AMQP basic.consume 메소드 사용
| |
|
| |
|
| <source lang='bash'> | | <source lang='bash'> |
14번째 줄: |
12번째 줄: |
| </source> | | </source> |
| :→ 'myexch'라는 exchange에 새로운 배타적 큐를 연결하고, 각 메시지 내용을 ./myscript 에 전달 | | :→ 'myexch'라는 exchange에 새로운 배타적 큐를 연결하고, 각 메시지 내용을 ./myscript 에 전달 |
|
| |
| ==실행예시==
| |
| * consume을 걸어둠
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-consume -e amq.direct -r key1 cat
| |
| Server provided queue name: amq.gen--CLHlLO0a8f_wf9mi2vLzA
| |
| </source>
| |
| * 다른 SSH세션에서 amqp-publish를 수행
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello1
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello2
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello3
| |
| root@zetawiki:~#
| |
| </source>
| |
| * 아까 consume하던 SSH세션에서 출력내용
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-consume -e amq.direct -r key1 cat
| |
| Server provided queue name: amq.gen--CLHlLO0a8f_wf9mi2vLzA
| |
| hello1hello2hello3
| |
| </source>
| |
|
| |
| ==실행예시 2==
| |
| * consume을 걸어둠
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-consume -e amq.direct -r key1 -q q1 cat
| |
| </source>
| |
| * 다른 SSH세션에서 amqp-publish를 수행
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello1
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello2
| |
| root@zetawiki:~# amqp-publish -e amq.direct -r key1 -b hello3
| |
| root@zetawiki:~#
| |
| </source>
| |
| * 아까 consume하던 SSH세션에서 출력내용
| |
| <source lang='console'>
| |
| root@zetawiki:~# amqp-consume -e amq.direct -r key1 -q q1 cat
| |
| hello1hello2hello3
| |
| </source>
| |
|
| |
|
| ==같이 보기== | | ==같이 보기== |
| * [[(amqp-tools) amqp-publish|amqp-publish]] | | * [[amqp-tools]] |
| * [[amqp-get]]
| |
| * [[amqp-tools 패키지]]
| |
| * [[(amqp-cli) amqp-consume]]
| |
|
| |
|
| [[분류: amqp-tools]] | | [[분류: amqp-tools]] |
| [[분류: /usr/bin]] | | [[분류: /usr/bin]] |