SlideShare una empresa de Scribd logo
1 de 22
RabbitMQ and EasyNetQ
  “Messaging that just works”

     Ken Taylor (@taylorka)
          reQuire LLC
RabbitMQ: Who, What?
•   Developed by SpringSource
•   Written in Erlang
•   Message Broker (MOM)
•   Advanced Message Queuing Protocol
    (AMQP)
RabbitMQ: Who, What?
• NASA NEBULA Cloud Computing
• AMQP Sponsors
 –Microsoft
 –Bank of America
 –JPMorgan Chase
 –Et. Al.
RabbitMQ: Why?

• Distributed
• Asynchronous
• Easy to use
• Highly fault tolerant
RabbitMQ: Why?

"The world is concurrent.
  Things in the world don't share data.
  Things communicate with messages.
  Things fail.“

    - Joe Armstrong
RabbitMQ: The Basics
•   Exchanges
•   Queues
•   Routing
•   Channels
•   Virtual Hosts
Mailbox, Postman & Post office
Exchange Types

• Direct
• Fanout
• Topic
• Headers
Direct Exchange
Headers exchange routing
•   Ignores routing key
•   Headers attributes used for routing
•   Can bind a queue using one or more headers
•   Can route on other values
    – Integer
    – Hash/Dictionary
    – Others
Topic exchange routing
• Routing to 1 or more queues
  – Message routing key
  – Pattern for queue binding
• Multicast Routing
• Consumers choose message to receive
Queues
• Store messages
• Consumed by applications
• Have properties
  – Durable
  – Exclusive
  – Auto-delete
• Declared before use
Channels & Virtual Hosts
• Channels
  – Lightweight connections that share a single TCP
    connection
• Virtual Hosts
  – Allows broker to host multiple environments
  – Similar to virtual hosts on IIS
EasyNetQ: Who, What?
• Open source (easynetq.com)
• Written by Mike Hadlow
  – github.com/mikehadlow
• NuGet Package
• Sponsored by 15below.com
EasyNetQ: Who, What?
• Simple .NET API
• Opinionated Implementation
  – Trades flexibility for simplicity
• Simple conventions
  – Messages should be represented by .NET types.
  – Messages should be routed by their .NET type.
EasyNetQ: Why?

• Easy to install
• Less code
• Serializes to JSON
• Simple conventions


                          DEMO
How can I use it today?
• Download Erlang OTP
  – Erlang.org
• Download RabbitMQ
  – Rabbitmq.com
• Install EasyNetQ with NuGet
  – “Install-Package EasyNetQ”
Questions?
• Important Links
  – Rabbitmq.com
  – Erlang.org
  – EasyNetq.com
• About Me
  – Ken Taylor (Twitter @taylorka)
  – Switchspan.com

Más contenido relacionado

La actualidad más candente

SEAC: Um Simulador Online para Ensino de Arquitetura de Computadores
SEAC: Um Simulador Online para Ensino de Arquitetura de ComputadoresSEAC: Um Simulador Online para Ensino de Arquitetura de Computadores
SEAC: Um Simulador Online para Ensino de Arquitetura de ComputadoresEduardo de Lucena Falcão
 
Unidade de medidas computacionais
Unidade de medidas computacionaisUnidade de medidas computacionais
Unidade de medidas computacionaisJosé Felipe
 
Aula07 - Arquitetura e Manutenção de Computadores
Aula07 - Arquitetura e Manutenção de ComputadoresAula07 - Arquitetura e Manutenção de Computadores
Aula07 - Arquitetura e Manutenção de ComputadoresJorge Ávila Miranda
 
Videoulas de algoritmos e lógica de programação
Videoulas de algoritmos e lógica de programaçãoVideoulas de algoritmos e lógica de programação
Videoulas de algoritmos e lógica de programaçãoaldoirjava
 
Informatica Basica
Informatica BasicaInformatica Basica
Informatica Basicaguestc7cb447
 
Arquitetura de Computadores: Barramentos e instruções
Arquitetura de Computadores: Barramentos e instruçõesArquitetura de Computadores: Barramentos e instruções
Arquitetura de Computadores: Barramentos e instruçõesAlex Camargo
 
Apostila parte 1 informatica basica pdf
Apostila parte 1   informatica basica pdfApostila parte 1   informatica basica pdf
Apostila parte 1 informatica basica pdfJohnAguiar11
 
Sistemas Operativos Distribuidos.
Sistemas Operativos Distribuidos.Sistemas Operativos Distribuidos.
Sistemas Operativos Distribuidos.argentm
 
Bancode dados modelagem conceitual
Bancode dados modelagem conceitualBancode dados modelagem conceitual
Bancode dados modelagem conceitualMario Sergio
 
02 - A evolução do Microsoft Windows - v1.0
02 - A evolução do Microsoft Windows - v1.002 - A evolução do Microsoft Windows - v1.0
02 - A evolução do Microsoft Windows - v1.0César Augusto Pessôa
 
AULA SOBRE PARTICOES 20.01.2023.pptx
AULA SOBRE PARTICOES 20.01.2023.pptxAULA SOBRE PARTICOES 20.01.2023.pptx
AULA SOBRE PARTICOES 20.01.2023.pptxADASVIEIRAArmazmPara
 
Arquitetura e Manutenção de Computadores
Arquitetura e Manutenção de ComputadoresArquitetura e Manutenção de Computadores
Arquitetura e Manutenção de ComputadoresJorge Ávila Miranda
 
Capa de enlace de datos
Capa de enlace de datosCapa de enlace de datos
Capa de enlace de datosJorge Arroyo
 
Php excel
Php excelPhp excel
Php excelpcuseth
 
Operador de Microcomputador.pdf
Operador de Microcomputador.pdfOperador de Microcomputador.pdf
Operador de Microcomputador.pdfOs Fantasmas !
 
Estrutura de Dados II - Apresentação da Disciplina
Estrutura de Dados II - Apresentação da DisciplinaEstrutura de Dados II - Apresentação da Disciplina
Estrutura de Dados II - Apresentação da DisciplinaDaniel Arndt Alves
 

La actualidad más candente (20)

Protocolos de Redes
Protocolos de RedesProtocolos de Redes
Protocolos de Redes
 
SEAC: Um Simulador Online para Ensino de Arquitetura de Computadores
SEAC: Um Simulador Online para Ensino de Arquitetura de ComputadoresSEAC: Um Simulador Online para Ensino de Arquitetura de Computadores
SEAC: Um Simulador Online para Ensino de Arquitetura de Computadores
 
Unidade de medidas computacionais
Unidade de medidas computacionaisUnidade de medidas computacionais
Unidade de medidas computacionais
 
Aula07 - Arquitetura e Manutenção de Computadores
Aula07 - Arquitetura e Manutenção de ComputadoresAula07 - Arquitetura e Manutenção de Computadores
Aula07 - Arquitetura e Manutenção de Computadores
 
Sania rtp
Sania rtpSania rtp
Sania rtp
 
Videoulas de algoritmos e lógica de programação
Videoulas de algoritmos e lógica de programaçãoVideoulas de algoritmos e lógica de programação
Videoulas de algoritmos e lógica de programação
 
Aula 5 manipulacao de arquivos e pastas
Aula 5   manipulacao de arquivos e pastasAula 5   manipulacao de arquivos e pastas
Aula 5 manipulacao de arquivos e pastas
 
Informatica Basica
Informatica BasicaInformatica Basica
Informatica Basica
 
Arquitetura de Computadores: Barramentos e instruções
Arquitetura de Computadores: Barramentos e instruçõesArquitetura de Computadores: Barramentos e instruções
Arquitetura de Computadores: Barramentos e instruções
 
Apostila parte 1 informatica basica pdf
Apostila parte 1   informatica basica pdfApostila parte 1   informatica basica pdf
Apostila parte 1 informatica basica pdf
 
Sistemas Operativos Distribuidos.
Sistemas Operativos Distribuidos.Sistemas Operativos Distribuidos.
Sistemas Operativos Distribuidos.
 
Bancode dados modelagem conceitual
Bancode dados modelagem conceitualBancode dados modelagem conceitual
Bancode dados modelagem conceitual
 
02 - A evolução do Microsoft Windows - v1.0
02 - A evolução do Microsoft Windows - v1.002 - A evolução do Microsoft Windows - v1.0
02 - A evolução do Microsoft Windows - v1.0
 
AULA SOBRE PARTICOES 20.01.2023.pptx
AULA SOBRE PARTICOES 20.01.2023.pptxAULA SOBRE PARTICOES 20.01.2023.pptx
AULA SOBRE PARTICOES 20.01.2023.pptx
 
Arquitetura e Manutenção de Computadores
Arquitetura e Manutenção de ComputadoresArquitetura e Manutenção de Computadores
Arquitetura e Manutenção de Computadores
 
Capa de enlace de datos
Capa de enlace de datosCapa de enlace de datos
Capa de enlace de datos
 
Php excel
Php excelPhp excel
Php excel
 
Modulo 5 Redes
Modulo 5   RedesModulo 5   Redes
Modulo 5 Redes
 
Operador de Microcomputador.pdf
Operador de Microcomputador.pdfOperador de Microcomputador.pdf
Operador de Microcomputador.pdf
 
Estrutura de Dados II - Apresentação da Disciplina
Estrutura de Dados II - Apresentação da DisciplinaEstrutura de Dados II - Apresentação da Disciplina
Estrutura de Dados II - Apresentação da Disciplina
 

Similar a RabbitMQ and EasyNetQ

CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionOrtus Solutions, Corp
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQAlvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQTanya Denisyuk
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP Eberhard Wolff
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqdevObjective
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqColdFusionConference
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_monTomas Doran
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640LLC NewLink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Newlink
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers OverviewVadym Lotar
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfAlvaro Videla
 

Similar a RabbitMQ and EasyNetQ (20)

Enterprise messaging
Enterprise messagingEnterprise messaging
Enterprise messaging
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Realtime web2012
Realtime web2012Realtime web2012
Realtime web2012
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQAlvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
Real time system_performance_mon
Real time system_performance_monReal time system_performance_mon
Real time system_performance_mon
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640Xen and-the-art-of-rails-deployment2640
Xen and-the-art-of-rails-deployment2640
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft Conf
 

Último

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Último (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

RabbitMQ and EasyNetQ

  • 1. RabbitMQ and EasyNetQ “Messaging that just works” Ken Taylor (@taylorka) reQuire LLC
  • 2.
  • 3. RabbitMQ: Who, What? • Developed by SpringSource • Written in Erlang • Message Broker (MOM) • Advanced Message Queuing Protocol (AMQP)
  • 4. RabbitMQ: Who, What? • NASA NEBULA Cloud Computing • AMQP Sponsors –Microsoft –Bank of America –JPMorgan Chase –Et. Al.
  • 5.
  • 6. RabbitMQ: Why? • Distributed • Asynchronous • Easy to use • Highly fault tolerant
  • 7. RabbitMQ: Why? "The world is concurrent. Things in the world don't share data. Things communicate with messages. Things fail.“ - Joe Armstrong
  • 8. RabbitMQ: The Basics • Exchanges • Queues • Routing • Channels • Virtual Hosts
  • 9. Mailbox, Postman & Post office
  • 10. Exchange Types • Direct • Fanout • Topic • Headers
  • 12.
  • 13. Headers exchange routing • Ignores routing key • Headers attributes used for routing • Can bind a queue using one or more headers • Can route on other values – Integer – Hash/Dictionary – Others
  • 14. Topic exchange routing • Routing to 1 or more queues – Message routing key – Pattern for queue binding • Multicast Routing • Consumers choose message to receive
  • 15. Queues • Store messages • Consumed by applications • Have properties – Durable – Exclusive – Auto-delete • Declared before use
  • 16. Channels & Virtual Hosts • Channels – Lightweight connections that share a single TCP connection • Virtual Hosts – Allows broker to host multiple environments – Similar to virtual hosts on IIS
  • 17. EasyNetQ: Who, What? • Open source (easynetq.com) • Written by Mike Hadlow – github.com/mikehadlow • NuGet Package • Sponsored by 15below.com
  • 18. EasyNetQ: Who, What? • Simple .NET API • Opinionated Implementation – Trades flexibility for simplicity • Simple conventions – Messages should be represented by .NET types. – Messages should be routed by their .NET type.
  • 19. EasyNetQ: Why? • Easy to install • Less code • Serializes to JSON • Simple conventions DEMO
  • 20. How can I use it today? • Download Erlang OTP – Erlang.org • Download RabbitMQ – Rabbitmq.com • Install EasyNetQ with NuGet – “Install-Package EasyNetQ”
  • 21.
  • 22. Questions? • Important Links – Rabbitmq.com – Erlang.org – EasyNetq.com • About Me – Ken Taylor (Twitter @taylorka) – Switchspan.com

Notas del editor

  1. SpringSource is a division of VMWareMessage Broker = MOM = Message Oriented MiddlewareMOM is software or hardware infrastructure supporting sending and receiving messages between distributed systems.Erlang – functional languagedesigned by Ericsson to support distributed, fault-tolerant, soft-real-time, non-stop applications. It supports hot swapping, so that code can be changed without stopping a system.The RabbitMQ project consists of:The RabbitMQ exchange server itselfGateways for HTTP, STOMP, and MQTT protocolsAMQP client libraries for Java, .NET Framework, and Erlang. (AMQP clients for other languages are available from other vendors)A plug-in platform for custom additions, with a pre-defined collection of supported plug-ins, including: a "Shovel" plug-in that takes care of copying (replicating) messages from one broker to anothera "Federation" plug-in that enables efficient sharing of messages between brokers (at the exchange level)a "Management" plug-in that enables monitoring and control of brokers and clusters of brokers.
  2. AMQP is a wire-level protocol. A wire-level protocol is a description of the format of the data that is sent across the network as a stream of octets. Consequently any tool that can create and interpret messages that conform to this data format can interoperate with any other compliant tool irrespective of implementation language.Examples of wire protocols areIIOP for CORBAJRMP for RMISOAP for Web ServicesAMQP for Message Oriented Middleware
  3. Management server at: http://localhost:15672/Exchanges route to queuesRouting is based on Exchange and Queue configurationhttp://www.rabbitmq.com/management.html
  4. Best analogy for RabbitMQ
  5. 4 main exchange types in RabbitMQ
  6. A direct exchange delivers messages to queues based on the message routing key. A direct exchange is ideal for the unicast routing of messages (although they can be used for multicast routing as well). Direct exchanges are often used to distribute tasks between multiple workers (instances of the same application) in a round robin manner. When doing so, it is important to understand that, in AMQP 0-9-1, messages are load balanced between consumers and not between queues.
  7. A fanout exchange routes messages to all of the queues that are bound to it and the routing key is ignored. If N queues are bound to a fanout exchange, when a new message is published to that exchange a copy of the message is delivered to all N queues. Fanout exchanges are ideal for the broadcast routing of messages. Because a fanout exchange delivers a copy of a message to every queue bound to it, its use cases are quite similar: Massively multi-player online (MMO) games can use it for leaderboard updates or other global eventsSport news sites can use fanout exchanges for distributing score updates to mobile clients in near real-timeDistributed systems can broadcast various state and configuration updatesGroup chats can distribute messages between participants using a fanout exchange (although AMQP does not have a built-in concept of presence, so XMPP may be a better choice)
  8. A headers exchange is designed for routing on multiple attributes that are more easily expressed as message headers than a routing key. Headers exchanges ignore the routing key attribute. Instead, the attributes used for routing are taken from the headers attribute. A message is considered matching if the value of the header equals the value specified upon binding. It is possible to bind a queue to a headers exchange using more than one header for matching. In this case, the broker needs one more piece of information from the application developer, namely, should it consider messages with any of the headers matching, or all of them? This is what the "x-match" binding argument is for. When the "x-match" argument is set to "any", just one matching header value is sufficient. Alternatively, setting "x-match" to "all" mandates that all the values must match. Headers exchanges can be looked upon as "direct exchanges on steroids". Because they route based on header values, they can be used as direct exchanges where the routing key does not have to be a string; it could be an integer or a hash (dictionary) for example.
  9. Topic exchanges route messages to one or many queues based on matching between a message routing key and the pattern that was used to bind a queue to an exchange. The topic exchange type is often used to implement various publish/subscribe pattern variations. Topic exchanges are commonly used for the multicast routing of messages. Topic exchanges have a very broad set of use cases. Whenever a problem involves multiple consumers/applications that selectively choose which type of messages they want to receive, the use of topic exchanges should be considered. Example uses: Distributing data relevant to specific geographic location, for example, points of saleBackground task processing done by multiple workers, each capable of handling specific set of tasksStocks price updates (and updates on other kinds of financial data)News updates that involve categorization or tagging (for example, only for a particular sport or team)Orchestration of services of different kinds in the cloudDistributed architecture/OS-specific software builds or packaging where each builder can handle only one architecture or OS
  10. Queues in the AMQP model are very similar to queues in other message- and task-queueing systems: they store messages that are consumed by applications. Queues share some properties with exchanges, but also have some additional properties: NameDurable (the queue will survive a broker restart)Exclusive (used by only one connection and the queue will be deleted when that connection closes)Auto-delete (queue is deleted when last consumer unsubscribes)Arguments (some brokers use it to implement additional features like message TTL)Before a queue can be used it has to be declared. Declaring a queue will cause it to be created if it does not already exist. The declaration will have no effect if the queue does already exist and its attributes are the same as those in the declaration. When the existing queue attributes are not the same as those in the declaration a channel-level exception with code 406 (PRECONDITION_FAILED) will be raised.
  11. Some applications need multiple connections to an AMQP broker. However, it is undesirable to keep many TCP connections open at the same time because doing so consumes system resources and makes it more difficult to configure firewalls. AMQP 0-9-1 connections are multiplexed with channels that can be thought of as "lightweight connections that share a single TCP connection". For applications that use multiple threads/processes for processing, it is very common to open a new channel per thread/process and not share channels between them. Communication on a particular channel is completely separate from communication on another channel, therefore every AMQP method also carries a channel number that clients use to figure out which channel the method is for (and thus, which event handler needs to be invoked, for example). ---To make it possible for a single broker to host multiple isolated "environments" (groups of users, exchanges, queues and so on), AMQP includes the concept of virtual hosts (vhosts). They are similar to virtual hosts used by many popular Web servers and provide completely isolated environments in which AMQP entities live. AMQP clients specify what vhosts they want to use during AMQP connection negotiation.
  12. 15below is a travel industry company used by JetBlue, Quantas, AirTran, Frontier and others..NET + RabbitMQ Scales to100s of Millions of Passenger Messages at 15below
  13. So why do I need EasyNetQ? The RabbitMQ .NET client implements the client side of the AMQP protocol (and RabbitMQ implements the server side). AMQP is intended as the HTTP of messaging. It is designed to be cross platform and language agnostic. It is also designed to flexibly support a wide range of messaging patterns based on the Exchange/Binding/Queue model. ---Typically this code would include:Implementing messaging patterns such as Publish/Subscribe or Request/Response. Although, to be fair, the .NET client does provide some support here. Implement a routing strategy. How will you design your exchange-queue bindings, and how will you route messages between producers and consumers? Implement message serialization/deserialization. How will you convert the binary representation of messages in AMQP to something your programming language understands? Implement a consumer thread for subscriptions. You will need to have a dedicated consumer loop waiting for messages you have subscribed to. How will you deal with multiple subscribers, or transient subscribers, like those waiting for responses from a request? Implement a versioning strategy for your messages. What happens when your message schema needs to change in response to business requirements? Implement subscriber reconnection. If the connection is disrupted or the RabbitMQ server bounces, how do you detect it and make sure all your subscriptions are rebuilt? Understand and implement quality of service settings. What settings do you need to make to ensure that you have a reliable client. Implement an error handling strategy. What should your client do if it receives a malformed message, or if an unexpected exception is thrown? Implement monitoring tools. How will you monitor your client applications so that you are alerted if there are any problems? ---It’s great having this flexibility, but with flexibility comes complexity. It means that you will need to write a significant amount of code in order to implement a RabbitMQ client.
  14. Conventions -> Messages are types (classes) and are routed by their type.
  15. Any questions