rabbitmq

Post on 03-Aug-2015

31 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Friday, May 8, 15

RabbitMQ: Who, What?

• Developed by SpringSource

• Written in Erlang

• Message Broker (MOM)

• Advanced Message Queuing Protocol (AMQP)

Friday, May 8, 15

Who uses AMQP?

• Financial Services

• Bank of America

• JPMorgan Chase Bank

• Microsoft

• Red Hat

• US Department of Homeland Security

Friday, May 8, 15

RabbitMQ: Why?

• Distributed

• Parallel

• Multiple worker balancing

• Acknowledgement

• Concurrent limit

• Ready task queue

Friday, May 8, 15

Mailbox, Postman & Post office

Friday, May 8, 15

Mailbox, Postman & Post office

Friday, May 8, 15

RabbitMQ: How?

• Producing

• Queue

• Consuming

Friday, May 8, 15

RabbitMQ: How?

P

Producingmeans nothing more than sending. A program that sends messages is a producer.

Friday, May 8, 15

RabbitMQ: How?

Queue

• A queue is the name for a mailbox.

• it can store as many messages as you like.

• Many producers can send messages that go to one queue, many consumers can try to receive data from one queue.

queue_name

Friday, May 8, 15

RabbitMQ: How?

Consuming

• has a similar meaning to receiving.

• A consumer is a program that mostly waits to receive messages.

C

Friday, May 8, 15

Hello World

P C

Hello

Friday, May 8, 15

Sending

P

Hello

Friday, May 8, 15

Receiving

C

Hello

Friday, May 8, 15

Work Queues

P

C1

C2

Friday, May 8, 15

Demo

Friday, May 8, 15

Exchanges

XP

• the producer never sends any messages directly to a queue.

• the producer doesn't even know if a message will be delivered to any queue at all.

• Instead, the producer can only send messages to an exchange.

C1

C2

Friday, May 8, 15

Exchange Types

• Fanout

• Direct

• Topic

Friday, May 8, 15

Fanout Exchange

Friday, May 8, 15

Direct Exchange

Friday, May 8, 15

Topic Exchange

Friday, May 8, 15

Demo

Friday, May 8, 15

Adaption

P

C1

X

type=topicimage.resize

image.notify

image.publish.*

C1

image.publish.thumbnailC1

C1

Friday, May 8, 15

Adaption

P

C1

X

type=topicblackman.interday

blackman.stock.import

blackman.stock.sync-rebirth

C1

blackman.stock.*C1

C1

Friday, May 8, 15

Kue VS RabbitMQKue RabbitMQ

Concurrency

Failure Attempts

Failure Backoff

Job Logs

Job Progress

Priority

Expiration

Work load

JSON API

Cluster

User-Interface

Delayed Jobs

Friday, May 8, 15

top related