Skip to main content

rabbitmq

tutorial

  • hello world

sender/receiver

  • Work Queues

use two worker to consume rabbitmq channel data command

for i in $(seq 1 1 2327);do ./sender -c $i ;done

如果需要確認這個服務是否有被受理,成功後再將此資料做刪除 auto-ack設定成false 將資料完成後,要送出d.ACK(false),來將這筆資料刪除queue msgs, err := ch.Consume( q.Name, // queue "", // consumer false, // auto-ack false, // exclusive false, // no-local false, // no-wait nil, // args )

ch.Qos 一次處理指定數量的資料

  • exchanges
    • direct: pair with router key, to send the same key queue
    • topic
      • * (star) can substitute for exactly one word.
      • # (hash) can substitute for zero or more words.
    • headers
    • fanout: 傳遞給下面的全部queue
  • publisher comfirm deadlock link