redundancy by making the process that reads the message confirm that it completed the transaction and it is safe to remove it. 2. Mitigate traffic spikes By queuing the data we can be assured the data will be persisted and then be processed eventually, even if that means it takes a little longer than usual due to a high traffic spike. 3. Batching for Efficiency 4. Asynchronous Messaging https://stackify.com/message-queues-12-reasons/ 3
key of the message. 2. Header “x-match” “all”: all the header key-value pairs must match “any”: at least one of the headers key-value pairs must match 3. Fanout routes messages to all of the queues that are bound to it 5
message. “*” can substitute for exactly one word. “#” can substitute for zero or more words. Exchanges (2/3) ad.vast.* ad.native.clicked ad.vast.clicked ad.native.impressed #.clicked #.landed #.impressed 6
when no queue is bound that matches the routing key Immediate: return error when no consumer on the matched queue is ready to accept the delivery. Confirm() / NotifyPublish() / NotifyConfirm() https://godoc.org/github.com/streadway/amqp#Channel.Publish
deliveries Exclusive: if Exclusive=false, the server will fairly distribute deliveries across multiple consumers. Ack(multiple) / Nack(multiple, requeue) multiple: multiple messages can be acknowledged with a single method requeue: the server will attempt to requeue the message Qos(prefetchCount, prefetchSize, global) global: Qos settings apply to all existing and future consumers on all channels on the same connection. Subscribe 12 http://www.rabbitmq.com/blog/2012/04/25/rabbitmq-performance-measurements-part-2/