Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Swarrot - A library to consume them all
Olivier Dolbeau
April 07, 2014
Programming
2
1.6k
Swarrot - A library to consume them all
Lightninh talk about Swarrot given at sfLive Paris 2014.
Olivier Dolbeau
April 07, 2014
Tweet
Share
More Decks by Olivier Dolbeau
See All by Olivier Dolbeau
odolbeau
0
120
odolbeau
2
280
odolbeau
0
32
odolbeau
0
250
odolbeau
0
55
odolbeau
0
600
odolbeau
4
640
odolbeau
1
290
odolbeau
1
310
Other Decks in Programming
See All in Programming
kubode
0
220
ufoo68
1
180
akatsukinewgrad
0
220
pyama86
2
210
kyonmm
2
2.2k
steipete
PRO
2
160
saki4869
0
190
hr01
1
1.3k
azdaroth
0
140
hr01
0
1.6k
akatsukinewgrad
0
210
ogidow
0
160
Featured
See All Featured
garrettdimon
287
110k
yeseniaperezcruz
302
31k
lara
172
9.5k
62gerente
587
200k
robhawkes
52
2.8k
jonrohan
1021
380k
eitanlees
111
9.9k
jacobian
255
20k
qrush
285
18k
chriscoyier
780
240k
jensimmons
207
10k
hatefulcrawdad
257
17k
Transcript
Swarrot A library to consume them all
To consume what?? Messages
From where ? Any broker !
Yeah, it’s about asynchronous tasks! Because asynchronous is good u
know?
There is 2 actors • Producer • Consumer
Swarrot What it really is.
An open source library • License: MIT • https://github.com/swarrot/swarrot •
Started 1 month ago
How it works Just listen
Create a message provider
Create a processor
OK, you’re done! Consume!
WAIT!!! That’s not all!
It’s all about decoration!
Some processors And what they do!
ExceptionCatcherProcessor You just see it! Useful in prod env only.
InstantRetryProcessor Something wrong happened? OK, try again! Useful for API
calls.
SignalHandlerProcessor You don’t want to stop your consumer immediately if
they are working! A must have!
Others • AckProcessor • MaxExecutionTimeProcessor • MaxMessagesProcessor • RetryProcessor •
...
Who started this? Me! Web architect @odolbeau
But I’m not alone! • Rémy Lemeunier (remyLemeunier) • Grégoire
Pineau (lyrixx) • Willy Morin (kaiska) • Yohan Giarelli (yohang) THANK YOU!
Feel free to contribute!
One more thing!
It’s already used in production!
Thank you!