SlideShare une entreprise Scribd logo
1  sur  80
Télécharger pour lire hors ligne
Modern Messaging with RabbitMQ,
Spring Cloud, and Reactor
Arnaud Cogoluègnes
@acogoluegnes
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Disclaimer
2
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Safe Harbor Statement
The following is intended to outline the general direction of Pivotal's offerings. It is intended for information
purposes only and may not be incorporated into any contract. Any information regarding pre-release of
Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal
and is subject to change. This information is provided without warranty or any kind, express or implied,
and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in
making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be
based on features currently available. The development, release, and timing of any features or
functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal.
Pivotal has no obligation to update forward looking information in this presentation.
3
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Arnaud Cogoluègnes
● Principal Software Engineer at Pivotal
● RabbitMQ Team
● Spring user since 2005
● Developer, trainer, consultant, author
4
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Agenda
● RabbitMQ update
● RabbitMQ in Spring and Reactor worlds
● Tips for the best RabbitMQ development experience
5
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Agenda
● RabbitMQ update
● RabbitMQ in Spring and Reactor worlds
● Tips for the best RabbitMQ development experience
6
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
What is RabbitMQ
● Messaging broker
● Multi-protocol (AMQP 0-9-1, AMQP 1.0, MQTT, STOMP, …)
● Started in 2006
● Broad ecosystem including Spring support
● Clustering and high availability support
● Web management UI & REST API
7
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ Ecosystem
● Officially supported clients: Java, Erlang, .NET, JMS
● Community-led clients: Ruby, Python, PHP, Objective-C, JavaScript, Go, C, C++
● And more…
● Higher-level clients: Spring AMQP, RawRabbit (.NET)
8
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
AMQP Model
9
Publishing
application
Consuming
application
Consuming
application
Exchange
Queues
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
When to use RabbitMQ?
● Enterprise Integration
● Asynchronicity, buffering for upstream when downstream is down
● High message rate, low latency use cases
● Many connections, low message rate, aka IoT use cases
10
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
What’s New RabbitMQ 3.7
● Released November 2017
● Focus on operations, usability, and reliability
● Operator policies and per-vhost message store (operations)
● New configuration format
● Peer discovery for cluster formation
● Proxy Protocol support for load balancing
11
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Historical configuration format
● Erlang terms, difficult to work with, even for machines
12
[
{ssl, [{versions, ['tlsv1.2', 'tlsv1.1']}]},
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/path/to/ca_certificate.pem"},
{certfile, "/path/to/server_certificate.pem"},
{keyfile,
"/path/to/server_key.pem"},
{versions, ['tlsv1.2', 'tlsv1.1']}
]}
]}
].
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
New configuration format
● INI / sysctl inspired
● Easier to generate and parse for both humans and machines
● Validated against a schema
13
listeners.ssl.1 = 5671
ssl_options.cacertfile = /path/to/ca_certificate.pem
ssl_options.certfile = /path/to/server_certificate.pem
ssl_options.keyfile = /path/to/server_key.pem
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Peer Discovery for Cluster Formation
14
Cluster
Where are
you guys?
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Peer Discovery for Cluster Formation
● How do peers discover each other at first start
● Previously, only CLI tools and configuration file
● Not very automation friendly
● Peer discovery phase into the RabbitMQ boot sequence
● Support for AWS, Kubernetes, etcd, Consul, pre-configured DNS records
● Other can be supported by virtue of the plugin system
15
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Proxy Protocol Support
● Common to use a proxy such as HAProxy or AWS ELB
● RabbitMQ could not display the real source IP
16
Client 2
<<ip-client-2>>
Client 3
<<ip-client-3>>
Client 1
<<ip-client-1>>
Proxy
<<ip-proxy>>
<<ip-proxy>>
<<ip-proxy>>
<<ip-proxy>>
Who’s this?
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Proxy Protocol Support
● A solution to know about client IP: Proxy Protocol
● Opt-in and requires a compatible proxy
● No client library changes
17
Client 2
<<ip-client-2>>
Client 3
<<ip-client-3>>
Client 1
<<ip-client-1>>
Proxy
<<ip-proxy>>
<<ip-client-1>>
<<ip-client-2>>
<<ip-client-3>>
Much better!
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Disclaimer
18
The following features may never happen.
This is R&D.
No promises.
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/ 19
RabbitMQ Roadmap
● OAuth support
● New strongly consistent queue implementation, aka “Quorum Queue”
● Better network partition handling, aka. “Mnevis initiative”
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Quorum Queue
● A new type of queue
● As long as more than half of nodes are available:
● Consistent (no message lost)
● Available
● Trades latency for throughput
● Builds on top of our own Raft library
● Raft: Consensus algorithm
● Jepsen tested
● Jepsen: toolkit to detect failures of a distributed system
● Should alleviate some of the shortcomings of mirrored queues
20
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Better network partition handling
● Network partition handling heavily depends on Mnesia
● Mnesia is Erlang internal distributed key-value store
● RabbitMQ requirements don’t always align with Mnesia
● Network partition detection, partial partition handling, etc
● Expected outcomes:
● Better resilience to network partition
● Easier to choose between availability and consistency
● Experiments at their early stages...
21
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ Java Client
● One of the officially supported clients
● The most used client
● Full support for AMQP 0.9.1 and RabbitMQ extensions
● Built-in support for automatic connection recovery
● 2 supported branches
● 4.x: Java 6+
● 5.x: Java 8+
● Independant release cycle since 4.0
● November 2016
22
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
New in RabbitMQ Java Client 4.0
● Automatic connection recovery enabled by default
● Logging support (!)
● Metrics support
● Dropwizard Metrics and Micrometer as of 4.3
● Java NIO connector (opt-in)
● With TLS support, no external dependency
● Topology recovery filtering and retry
23
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
New in RabbitMQ Java Client 5.0
● Java 8 is required
● Lambda-oriented API:
● For Consumers (message delivery, cancellation, etc)
● For Listeners (publish confirms, rejected messages, etc)
● Asynchronous RPC (with CompletableFuture)
24
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Agenda
● RabbitMQ update
● RabbitMQ in the Spring and Reactor world
● Tips for the best RabbitMQ development experience
25
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ in Spring and Reactor Worlds
26
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring AMQP
27
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring AMQP
● Spring concepts for AMQP
● Template approach
● POJO programming (serialization/deserialization)
● Queue affinity for message consumption
● Built-in connection and topology recovery
● Sophisticated message container listeners
● Request/reply
28
Spring AMQP
Spring
Framework
RabbitMQ Java
Client
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Boot
29
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ Support in Spring Boot
● Declare and autowire:
● Connection factory
● Access template
● Asynchronous listeners
● Metrics for instrumentation of connections
30
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo - Spring Boot & RabbitMQ
● Auto-configuration
● RabbitMQ Client metrics
● Prometheus endpoint
31
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor
32
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Reactive and functional API for
RabbitMQ
● Reactor’s Flux and Mono API to
produce and consume messages
● Builds on top the Java client and
Reactor Core
33
Reactor RabbitMQ
Reactor
Core
RabbitMQ
Java Client
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Use cases:
● Manage exchanges, queues,
and bindings
● Publish a Flux of messages
● Consume messages as a Flux
34
Reactor RabbitMQ
Reactor
Core
RabbitMQ
Java Client
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Managing exchanges, queues, and bindings
35
Sender sender = ReactorRabbitMq.createSender(senderOptions);
sender.declare(exchange("my.exchange"))
.then(sender.declare(queue("my.queue")))
.then(sender.bind(binding("my.exchange", "a.b","my.queue")))
.subscribe(r -> System.out.println("Declared and bound"));
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Publishing messages
36
Sender sender = ReactorRabbitMq.createSender(senderOptions);
Flux<OutboundMessage> outboundFlux = ...
sender.send(outboundFlux)
.doOnError(e -> log.error("Send failed", e))
.subscribe();
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Publishing messages with publisher confirms
37
Sender sender = ReactorRabbitMq.createSender(senderOptions);
Flux<OutboundMessage> outboundFlux = ...
sender.sendWithPublishConfirms(outboundFlux)
.subscribe(outboundMessageResult -> {
log.info("Outbound message has reached the broker");
});
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ
● Consuming messages
38
Receiver receiver = ReactorRabbitMq.createReceiver();
Flux<Delivery> inboundFlux = receiver
.consumeNoAck("reactive.queue");
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor RabbitMQ: other goodies
● Acknowledgment
● Retry on publishing
● Connection failure handling
● Request/reply with Mono
39
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactor
40
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactive Monitoring over HTTP with HOP
● Java Client for RabbitMQ REST API
● Meant for administration and monitoring, not messaging
● 2 clients:
● Blocking client based on Spring’s RestTemplate
● Non-blocking, reactive client based on Reactor Netty
41
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactive Monitoring over HTTP with HOP
42
HOP
Spring Web
(RestTemplate)
Reactor Netty
RabbitMQ Management Plugin
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Reactive Monitoring over HTTP with HOP
● Compute message rate across virtual hosts:
43
ReactorNettyClient client = new ReactorNettyClient(
"http://localhost:15672/api", "guest", "guest"
);
Mono<Double> vhostsRate = client.getVhosts()
.map(vhostInfo -> vhostInfo.getMessagesDetails().getRate())
.reduce(0.0, (acc, current) -> acc + current);
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Framework
44
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring WebSocket
● In Spring MVC and Spring WebFlux
● Make web pages dynamic and reactive
● Good for low latency, high frequency, and high volume use cases
● Broker abstraction for message passing
● Local and STOMP relay implementations
45
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring WebSocket, local broker
46
Browser 2
Browser 1
Web
Container
Notifications
Notifications
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring WebSocket, local broker, cluster
47
Browser 1
Web
Container
Notifications
Web
Container
Browser 2
Notifications
ClusterClients DO NOT see each other
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring WebSocket, STOMP broker, cluster
48
Browser 1
Web
Container
Notifications
Web
Container
Browser 2
Notifications
ClusterClients DO see each other
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Demo - Spring WebSocket & RabbitMQ
● Handling global notifications with a full-blown broker
49
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Integration
50
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Integration
● Make application agnostic to messaging technology
● Inbound/Outbound AMQP adapters (1-way)
● Inbound/Outbound AMQP gateway (2-way, for request/reply)
● AMQP-backed channel implementation
● Enterprise Integration Patterns
● Based on Spring AMQP
● Foundation for Spring Cloud Stream
51
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Stream
52
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Stream
● Opinionated framework for
message-driven microservices
● Builds on top Spring Boot and Spring
Integration
● Concepts:
● Input and output bindings for
integration
● Processor for application logic
● Consumer groups and partitioning
for scaling
53
Spring Cloud Stream
Spring
Integration
Spring Boot
Spring AMQP
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Stream
● Where does RabbitMQ fit?
● It binds Spring Cloud Stream applications to each other
● Goodies: partitioning, dead lettering, batch sending, etc
54
Spring Cloud Stream Application Spring Cloud Stream Application
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Data Flow
55
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Data Flow
● A place to deploy your streams
● Run the stream applications on a variety of runtime platforms
● RabbitMQ is the messaging middleware broker that connects applications
56
Spring Cloud Data Flow
SCS App
SCS App
SCS App
SCS App
SCS App
SCS App
Apps run on Cloud Foundry, Kubernetes, Mesos, YARN
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud
57
Spring AMQP
Spring Boot
Reactor
Spring
Spring Integration
Spring Cloud
Spring Cloud Data Flow
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud
● Many projects…
● Spring Cloud Config
58
Spring Cloud
Config
ApplicationApplicationApplicationGit
Get ${...}
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Configuration Refresh
● Update @Refresh beans on configuration change
● Use Spring Cloud Config and Spring Cloud Bus
59
Spring Cloud
Config
ApplicationGit
Get ${...}
Push
Consume configuration
updates
POST /monitor
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Agenda
● RabbitMQ update
● RabbitMQ in Spring and Reactor worlds
● Tips for the best RabbitMQ development experience
60
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Tips for the RabbitMQ Spring developer
● Tame the runtime: seamless RabbitMQ installation on your dev workstation
● Design properly: avoid common pitfalls
● Ship confidently: simulate your workload with PerfTest
61
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ installation: Erlang
● RabbitMQ is written in Erlang
● Erlang applications run on the Erlang Virtual Machine
● How to install Erlang?
● On server: use ESL or RabbitMQ Team native packages
● On dev workstation: use packages or kerl
62
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Erlang installation with kerl
● Kerl compiles and installs Erlang SDK
● Why not native packages/installers?
● They don’t always ship with the latest patch release
● Hard to have different Erlang versions on the same machine
● Think of kerl as a SDKMAN! for Erlang
63
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Erlang installation with kerl
● Compile Erlang patch release from GitHub:
● List the builds on the current machine:
64
$ kerl build git https://github.com/erlang/otp.git OTP-20.3.4 20.3.4
$ kerl list builds
git,19.1.1
git,19.1.5
git,19.2
git,19.2.3
git,20.0.1
git,20.3.4
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
RabbitMQ installation
● How to install RabbitMQ?
● On server: use RabbitMQ Team native packages
● On dev workstation: use packages or generic Unix binary
● Generic Unix binary
● For Linux, Unix, macOS
● Easy way to have several versions on the same machine
65
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
With the previous tips...
● Make development easier
● Use different Erlang and RabbitMQ versions
● Test migration scenarios locally
● Start several nodes and cluster them locally
66
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Design tips: consuming
● Use auto-acknowledgment only with fast consumers
● Use acknowledgment and set quality of service (QoS) properly
● QoS: number of unacknowledged messages for a client channel
● Prevent overflowing a client with messages
● Make load balancing between consumers better
● Don’t use 1 for QoS, as it usually under-utilizes consumers
67
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Design tips: scaling
● A queue has a limited throughput
● It’s an Erlang process ( ~ Java thread)
● Scale by using several queues
● Random/Consistent hash exchange, sharding plugin, Spring Cloud Stream
partition implementation
● Use top plugin to identify bottlenecks
● Process with the highest “Reductions / sec” is most likely a bottleneck
68
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Workload simulation with PerfTest
● PerfTest is a throughput testing tool
● It can simulate simple to advanced workloads
● Now an independent project (used to ship with the Java client)
● Uses the Java client
● Eat your own dog food
● Used internally for our long-running environments and use-case-oriented
workloads
69
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
PerfTest overview
● Configurable publishing and consuming rates
● Topology creation and configuration (exchanges, bindings, queues)
● Message latency calculation
● Consumer latency configuration
● Custom message content to simulate real messages
● TLS configuration support
● Connection and topology recovery support
● Fine-grained threading options for typical IoT workloads
● Monitoring support through Micrometer
● Cloud Foundry template project
70
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Simulate throughput workload
10 producers sending 1000 messages / second
10 consumers
10 queues (perf-test-1, perf-test-2, … perf-test-10)
71
$ ./runjava com.rabbitmq.perf.PerfTest --rate 1000 
--producers 10 --consumers 10 
--queue-pattern 'perf-test-%d' 
--queue-pattern-from 1 --queue-pattern-to 10
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Simulating IoT workloads
● 10 Ks, 100 Ks connections
● Puts a lot of pressure on the broker… and on the testing tool as well!
● Resource on the testing tool side:
● Memory
● Threads
● Files descriptors (connections)
● Serious optimizations needed to avoid using 10s, 100s of testing instances
72
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Simulate IoT workload
100 producers sending 1 message every 5 seconds
Each producer starts between 1 and 120 seconds
300 consumers
100 queues (perf-test-001, perf-test-002, … perf-test-100)
=> ~ 1 K threads
73
$ ./runjava com.rabbitmq.perf.PerfTest 
--publishing-interval 5 --producer-random-start-delay 120 
--producers 100 --consumers 300 
--queue-pattern 'perf-test-%03d' 
--queue-pattern-from 1 --queue-pattern-to 100
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Simulate (bigger) IoT workload
1000 producers sending 1 message every 30 seconds
Each producer starts between 1 and 300 seconds
3000 consumers
1000 queues (perf-test-0001, perf-test-0002, … perf-test-1000)
=> ~ 150 threads
74
$ ./runjava com.rabbitmq.perf.PerfTest 
--publishing-interval 30 --producer-random-start-delay 300 
--producers 1000 --consumers 3000 
--queue-pattern 'perf-test-%04d' 
--queue-pattern-from 1 --queue-pattern-to 1000
--heartbeat-sender-threads 10 --nio-threads 20
--consumers-thread-pools 100
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Monitoring with PerfTest
● Expose PerfTest clients metrics, as well as JVM and OS metrics
● JMX, Datadog, and Prometheus supported so far
75
$ ./runjava com.rabbitmq.perf.PerfTest 
--metrics-prometheus
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
PerfTest dashboard with Grafana
76
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Wrapping up
● RabbitMQ present in many places in Spring & Reactor stacks
● First-class support and integration
● Continuous effort to bring and maintain this support
77
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Questions?
78
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Thank you!
79
© 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license:
http://creativecommons.org/licenses/by-nc/3.0/
Resources
Code sample: https://github.com/acogoluegnes/spring-rabbitmq
RabbitMQ: http://www.rabbitmq.com/
RabbitMQ Java client: https://github.com/rabbitmq/rabbitmq-java-client
Reactor RabbitMQ: https://github.com/reactor/reactor-rabbitmq
Hop: https://github.com/rabbitmq/hop
Kerl: https://github.com/kerl/kerl
QoS: https://www.rabbitmq.com/blog/2012/05/11/some-queuing-theory-throughput-latency-and-bandwidth/
Queues in RabbitMQ: https://www.rabbitmq.com/queues.html#runtime-characteristics
PerfTest: https://github.com/rabbitmq/rabbitmq-perf-test/
PerfTest and IoT workloads: https://rabbitmq.github.io/rabbitmq-perf-test/stable/htmlsingle/#simulating-high-loads
80

Contenu connexe

Tendances

Cloud Foundry Networking with VMware NSX
Cloud Foundry Networking with VMware NSXCloud Foundry Networking with VMware NSX
Cloud Foundry Networking with VMware NSXVMware Tanzu
 
Recording and media manipulation of WebRTC streams
Recording and media manipulation of WebRTC streamsRecording and media manipulation of WebRTC streams
Recording and media manipulation of WebRTC streamsLuis Lopez
 
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices VMware Tanzu
 
WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)Luis Lopez
 
Developing applications with Kurento
Developing applications with KurentoDeveloping applications with Kurento
Developing applications with KurentoLuis Lopez
 
Webrtc world tour_2019_2nd edition_ed1_uprism_syson
Webrtc world tour_2019_2nd edition_ed1_uprism_sysonWebrtc world tour_2019_2nd edition_ed1_uprism_syson
Webrtc world tour_2019_2nd edition_ed1_uprism_sysonsung young son
 
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureToronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureAlexandra N. Martinez
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive ProgrammingStéphane Maldini
 
kurento-nubomedia-first-steps-v1
kurento-nubomedia-first-steps-v1kurento-nubomedia-first-steps-v1
kurento-nubomedia-first-steps-v1Luis Lopez
 
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"OPITZ CONSULTING Deutschland
 
WebRTC World Trip 2018_20181101@rtc_korea
WebRTC World Trip 2018_20181101@rtc_koreaWebRTC World Trip 2018_20181101@rtc_korea
WebRTC World Trip 2018_20181101@rtc_koreasung young son
 
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Luis Lopez
 
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...Luis Lopez
 
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with KurentoFOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with KurentoLuis Lopez
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Scott Sims
 
Get the Most Out of Kubernetes with NGINX
Get the Most Out of Kubernetes with NGINXGet the Most Out of Kubernetes with NGINX
Get the Most Out of Kubernetes with NGINXNGINX, Inc.
 
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...Angel Alberici
 
Kurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCKurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCLuis Lopez
 
Mirai botnet
Mirai botnetMirai botnet
Mirai botnetOWASP
 
High performance stream processing
High performance stream processingHigh performance stream processing
High performance stream processingGlenn Renfro
 

Tendances (20)

Cloud Foundry Networking with VMware NSX
Cloud Foundry Networking with VMware NSXCloud Foundry Networking with VMware NSX
Cloud Foundry Networking with VMware NSX
 
Recording and media manipulation of WebRTC streams
Recording and media manipulation of WebRTC streamsRecording and media manipulation of WebRTC streams
Recording and media manipulation of WebRTC streams
 
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices
Cloud Foundry Networking: Enabling Direct Communicatitions for Microservices
 
WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)WebRTC infrastructures in the large (with experiences on real cloud deployments)
WebRTC infrastructures in the large (with experiences on real cloud deployments)
 
Developing applications with Kurento
Developing applications with KurentoDeveloping applications with Kurento
Developing applications with Kurento
 
Webrtc world tour_2019_2nd edition_ed1_uprism_syson
Webrtc world tour_2019_2nd edition_ed1_uprism_sysonWebrtc world tour_2019_2nd edition_ed1_uprism_syson
Webrtc world tour_2019_2nd edition_ed1_uprism_syson
 
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB ArchitectureToronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
Toronto Virtual Meetup #7 - Anypoint VPC, VPN and DLB Architecture
 
Intro to Reactive Programming
Intro to Reactive ProgrammingIntro to Reactive Programming
Intro to Reactive Programming
 
kurento-nubomedia-first-steps-v1
kurento-nubomedia-first-steps-v1kurento-nubomedia-first-steps-v1
kurento-nubomedia-first-steps-v1
 
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
Architecture Room Stuttgart - "Cloud-native ist nur ein Teil des Spiels!"
 
WebRTC World Trip 2018_20181101@rtc_korea
WebRTC World Trip 2018_20181101@rtc_koreaWebRTC World Trip 2018_20181101@rtc_korea
WebRTC World Trip 2018_20181101@rtc_korea
 
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
 
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
 
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with KurentoFOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
 
Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016Brocade Software Networking Presentation at Interface 2016
Brocade Software Networking Presentation at Interface 2016
 
Get the Most Out of Kubernetes with NGINX
Get the Most Out of Kubernetes with NGINXGet the Most Out of Kubernetes with NGINX
Get the Most Out of Kubernetes with NGINX
 
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...
 
Kurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTCKurento: a media server architecture and API for WebRTC
Kurento: a media server architecture and API for WebRTC
 
Mirai botnet
Mirai botnetMirai botnet
Mirai botnet
 
High performance stream processing
High performance stream processingHigh performance stream processing
High performance stream processing
 

Similaire à Modern Messaging with RabbitMQ, Spring Cloud, and Reactor

It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?VMware Tanzu
 
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques VMware Tanzu
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with IstioVMware Tanzu
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Daniel Woods
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...VMware Tanzu
 
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...Enterprise Systems Built With Microservices are Designed to Expect Failures, ...
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...VMware Tanzu
 
P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersVMware Tanzu
 
Containerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesContainerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesVMware Tanzu
 
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...apidays
 
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...Datacratic
 
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InSteeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InVMware Tanzu
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScriptRiverbed Technology
 
Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Stéphane Maldini
 
Securing Microservices with Spring Cloud Security
Securing Microservices with Spring Cloud SecuritySecuring Microservices with Spring Cloud Security
Securing Microservices with Spring Cloud SecurityWill Tran
 
How to Build More Secure Service Brokers
How to Build More Secure Service BrokersHow to Build More Secure Service Brokers
How to Build More Secure Service BrokersVMware Tanzu
 

Similaire à Modern Messaging with RabbitMQ, Spring Cloud, and Reactor (20)

It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?It’s a Multi-Cloud World, But What About The Data?
It’s a Multi-Cloud World, But What About The Data?
 
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques
Re-Platforming Legacy .Net Applications to PCF Using Modernized Techniques
 
Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
 
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...Enterprise Systems Built With Microservices are Designed to Expect Failures, ...
Enterprise Systems Built With Microservices are Designed to Expect Failures, ...
 
P to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to ContainersP to V to C: The Value of Bringing “Everything” to Containers
P to V to C: The Value of Bringing “Everything” to Containers
 
Containerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for KubernetesContainerizing a Data Warehouse for Kubernetes
Containerizing a Data Warehouse for Kubernetes
 
S1P: Spring Cloud on PKS
S1P: Spring Cloud on PKSS1P: Spring Cloud on PKS
S1P: Spring Cloud on PKS
 
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
apidays LIVE New York 2021 - Microservice Authorization with Open Policy Agen...
 
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
 
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-InSteeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
Steeltoe: Develop .NET Microservices Without Cloud Platform Lock-In
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScript
 
Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5Introduction to Reactive Streams and Reactor 2.5
Introduction to Reactive Streams and Reactor 2.5
 
Securing Microservices with Spring Cloud Security
Securing Microservices with Spring Cloud SecuritySecuring Microservices with Spring Cloud Security
Securing Microservices with Spring Cloud Security
 
How to Build More Secure Service Brokers
How to Build More Secure Service BrokersHow to Build More Secure Service Brokers
How to Build More Secure Service Brokers
 

Plus de acogoluegnes

What's up, RabbitMQ?
What's up, RabbitMQ?What's up, RabbitMQ?
What's up, RabbitMQ?acogoluegnes
 
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
Microservices with Netflix OSS and Spring Cloud -  Dev Day OrangeMicroservices with Netflix OSS and Spring Cloud -  Dev Day Orange
Microservices with Netflix OSS and Spring Cloud - Dev Day Orangeacogoluegnes
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloudacogoluegnes
 
Cartographie du big data
Cartographie du big dataCartographie du big data
Cartographie du big dataacogoluegnes
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introductionacogoluegnes
 
Cascading at the Lyon Hadoop User Group
Cascading at the Lyon Hadoop User GroupCascading at the Lyon Hadoop User Group
Cascading at the Lyon Hadoop User Groupacogoluegnes
 

Plus de acogoluegnes (7)

What's up, RabbitMQ?
What's up, RabbitMQ?What's up, RabbitMQ?
What's up, RabbitMQ?
 
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
Microservices with Netflix OSS and Spring Cloud -  Dev Day OrangeMicroservices with Netflix OSS and Spring Cloud -  Dev Day Orange
Microservices with Netflix OSS and Spring Cloud - Dev Day Orange
 
Microservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring CloudMicroservices with Netflix OSS and Spring Cloud
Microservices with Netflix OSS and Spring Cloud
 
Cartographie du big data
Cartographie du big dataCartographie du big data
Cartographie du big data
 
NoSQL et Big Data
NoSQL et Big DataNoSQL et Big Data
NoSQL et Big Data
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
Cascading at the Lyon Hadoop User Group
Cascading at the Lyon Hadoop User GroupCascading at the Lyon Hadoop User Group
Cascading at the Lyon Hadoop User Group
 

Dernier

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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Dernier (20)

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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.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
 
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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
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)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Modern Messaging with RabbitMQ, Spring Cloud, and Reactor

  • 1. Modern Messaging with RabbitMQ, Spring Cloud, and Reactor Arnaud Cogoluègnes @acogoluegnes
  • 2. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Disclaimer 2
  • 3. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Safe Harbor Statement The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation. 3
  • 4. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Arnaud Cogoluègnes ● Principal Software Engineer at Pivotal ● RabbitMQ Team ● Spring user since 2005 ● Developer, trainer, consultant, author 4
  • 5. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda ● RabbitMQ update ● RabbitMQ in Spring and Reactor worlds ● Tips for the best RabbitMQ development experience 5
  • 6. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda ● RabbitMQ update ● RabbitMQ in Spring and Reactor worlds ● Tips for the best RabbitMQ development experience 6
  • 7. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What is RabbitMQ ● Messaging broker ● Multi-protocol (AMQP 0-9-1, AMQP 1.0, MQTT, STOMP, …) ● Started in 2006 ● Broad ecosystem including Spring support ● Clustering and high availability support ● Web management UI & REST API 7
  • 8. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ Ecosystem ● Officially supported clients: Java, Erlang, .NET, JMS ● Community-led clients: Ruby, Python, PHP, Objective-C, JavaScript, Go, C, C++ ● And more… ● Higher-level clients: Spring AMQP, RawRabbit (.NET) 8
  • 9. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ AMQP Model 9 Publishing application Consuming application Consuming application Exchange Queues
  • 10. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ When to use RabbitMQ? ● Enterprise Integration ● Asynchronicity, buffering for upstream when downstream is down ● High message rate, low latency use cases ● Many connections, low message rate, aka IoT use cases 10
  • 11. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What’s New RabbitMQ 3.7 ● Released November 2017 ● Focus on operations, usability, and reliability ● Operator policies and per-vhost message store (operations) ● New configuration format ● Peer discovery for cluster formation ● Proxy Protocol support for load balancing 11
  • 12. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Historical configuration format ● Erlang terms, difficult to work with, even for machines 12 [ {ssl, [{versions, ['tlsv1.2', 'tlsv1.1']}]}, {rabbit, [ {ssl_listeners, [5671]}, {ssl_options, [{cacertfile,"/path/to/ca_certificate.pem"}, {certfile, "/path/to/server_certificate.pem"}, {keyfile, "/path/to/server_key.pem"}, {versions, ['tlsv1.2', 'tlsv1.1']} ]} ]} ].
  • 13. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ New configuration format ● INI / sysctl inspired ● Easier to generate and parse for both humans and machines ● Validated against a schema 13 listeners.ssl.1 = 5671 ssl_options.cacertfile = /path/to/ca_certificate.pem ssl_options.certfile = /path/to/server_certificate.pem ssl_options.keyfile = /path/to/server_key.pem ssl_options.versions.1 = tlsv1.2 ssl_options.versions.2 = tlsv1.1
  • 14. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Peer Discovery for Cluster Formation 14 Cluster Where are you guys?
  • 15. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Peer Discovery for Cluster Formation ● How do peers discover each other at first start ● Previously, only CLI tools and configuration file ● Not very automation friendly ● Peer discovery phase into the RabbitMQ boot sequence ● Support for AWS, Kubernetes, etcd, Consul, pre-configured DNS records ● Other can be supported by virtue of the plugin system 15
  • 16. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Proxy Protocol Support ● Common to use a proxy such as HAProxy or AWS ELB ● RabbitMQ could not display the real source IP 16 Client 2 <<ip-client-2>> Client 3 <<ip-client-3>> Client 1 <<ip-client-1>> Proxy <<ip-proxy>> <<ip-proxy>> <<ip-proxy>> <<ip-proxy>> Who’s this?
  • 17. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Proxy Protocol Support ● A solution to know about client IP: Proxy Protocol ● Opt-in and requires a compatible proxy ● No client library changes 17 Client 2 <<ip-client-2>> Client 3 <<ip-client-3>> Client 1 <<ip-client-1>> Proxy <<ip-proxy>> <<ip-client-1>> <<ip-client-2>> <<ip-client-3>> Much better!
  • 18. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Disclaimer 18 The following features may never happen. This is R&D. No promises.
  • 19. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 19 RabbitMQ Roadmap ● OAuth support ● New strongly consistent queue implementation, aka “Quorum Queue” ● Better network partition handling, aka. “Mnevis initiative”
  • 20. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Quorum Queue ● A new type of queue ● As long as more than half of nodes are available: ● Consistent (no message lost) ● Available ● Trades latency for throughput ● Builds on top of our own Raft library ● Raft: Consensus algorithm ● Jepsen tested ● Jepsen: toolkit to detect failures of a distributed system ● Should alleviate some of the shortcomings of mirrored queues 20
  • 21. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Better network partition handling ● Network partition handling heavily depends on Mnesia ● Mnesia is Erlang internal distributed key-value store ● RabbitMQ requirements don’t always align with Mnesia ● Network partition detection, partial partition handling, etc ● Expected outcomes: ● Better resilience to network partition ● Easier to choose between availability and consistency ● Experiments at their early stages... 21
  • 22. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ Java Client ● One of the officially supported clients ● The most used client ● Full support for AMQP 0.9.1 and RabbitMQ extensions ● Built-in support for automatic connection recovery ● 2 supported branches ● 4.x: Java 6+ ● 5.x: Java 8+ ● Independant release cycle since 4.0 ● November 2016 22
  • 23. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ New in RabbitMQ Java Client 4.0 ● Automatic connection recovery enabled by default ● Logging support (!) ● Metrics support ● Dropwizard Metrics and Micrometer as of 4.3 ● Java NIO connector (opt-in) ● With TLS support, no external dependency ● Topology recovery filtering and retry 23
  • 24. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ New in RabbitMQ Java Client 5.0 ● Java 8 is required ● Lambda-oriented API: ● For Consumers (message delivery, cancellation, etc) ● For Listeners (publish confirms, rejected messages, etc) ● Asynchronous RPC (with CompletableFuture) 24
  • 25. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda ● RabbitMQ update ● RabbitMQ in the Spring and Reactor world ● Tips for the best RabbitMQ development experience 25
  • 26. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ in Spring and Reactor Worlds 26 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 27. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP 27 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 28. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP ● Spring concepts for AMQP ● Template approach ● POJO programming (serialization/deserialization) ● Queue affinity for message consumption ● Built-in connection and topology recovery ● Sophisticated message container listeners ● Request/reply 28 Spring AMQP Spring Framework RabbitMQ Java Client
  • 29. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot 29 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 30. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ Support in Spring Boot ● Declare and autowire: ● Connection factory ● Access template ● Asynchronous listeners ● Metrics for instrumentation of connections 30
  • 31. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo - Spring Boot & RabbitMQ ● Auto-configuration ● RabbitMQ Client metrics ● Prometheus endpoint 31
  • 32. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor 32 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 33. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Reactive and functional API for RabbitMQ ● Reactor’s Flux and Mono API to produce and consume messages ● Builds on top the Java client and Reactor Core 33 Reactor RabbitMQ Reactor Core RabbitMQ Java Client
  • 34. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Use cases: ● Manage exchanges, queues, and bindings ● Publish a Flux of messages ● Consume messages as a Flux 34 Reactor RabbitMQ Reactor Core RabbitMQ Java Client
  • 35. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Managing exchanges, queues, and bindings 35 Sender sender = ReactorRabbitMq.createSender(senderOptions); sender.declare(exchange("my.exchange")) .then(sender.declare(queue("my.queue"))) .then(sender.bind(binding("my.exchange", "a.b","my.queue"))) .subscribe(r -> System.out.println("Declared and bound"));
  • 36. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Publishing messages 36 Sender sender = ReactorRabbitMq.createSender(senderOptions); Flux<OutboundMessage> outboundFlux = ... sender.send(outboundFlux) .doOnError(e -> log.error("Send failed", e)) .subscribe();
  • 37. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Publishing messages with publisher confirms 37 Sender sender = ReactorRabbitMq.createSender(senderOptions); Flux<OutboundMessage> outboundFlux = ... sender.sendWithPublishConfirms(outboundFlux) .subscribe(outboundMessageResult -> { log.info("Outbound message has reached the broker"); });
  • 38. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ ● Consuming messages 38 Receiver receiver = ReactorRabbitMq.createReceiver(); Flux<Delivery> inboundFlux = receiver .consumeNoAck("reactive.queue");
  • 39. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor RabbitMQ: other goodies ● Acknowledgment ● Retry on publishing ● Connection failure handling ● Request/reply with Mono 39
  • 40. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactor 40 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 41. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Monitoring over HTTP with HOP ● Java Client for RabbitMQ REST API ● Meant for administration and monitoring, not messaging ● 2 clients: ● Blocking client based on Spring’s RestTemplate ● Non-blocking, reactive client based on Reactor Netty 41
  • 42. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Monitoring over HTTP with HOP 42 HOP Spring Web (RestTemplate) Reactor Netty RabbitMQ Management Plugin
  • 43. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Monitoring over HTTP with HOP ● Compute message rate across virtual hosts: 43 ReactorNettyClient client = new ReactorNettyClient( "http://localhost:15672/api", "guest", "guest" ); Mono<Double> vhostsRate = client.getVhosts() .map(vhostInfo -> vhostInfo.getMessagesDetails().getRate()) .reduce(0.0, (acc, current) -> acc + current);
  • 44. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Framework 44 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 45. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebSocket ● In Spring MVC and Spring WebFlux ● Make web pages dynamic and reactive ● Good for low latency, high frequency, and high volume use cases ● Broker abstraction for message passing ● Local and STOMP relay implementations 45
  • 46. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebSocket, local broker 46 Browser 2 Browser 1 Web Container Notifications Notifications
  • 47. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebSocket, local broker, cluster 47 Browser 1 Web Container Notifications Web Container Browser 2 Notifications ClusterClients DO NOT see each other
  • 48. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring WebSocket, STOMP broker, cluster 48 Browser 1 Web Container Notifications Web Container Browser 2 Notifications ClusterClients DO see each other
  • 49. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Demo - Spring WebSocket & RabbitMQ ● Handling global notifications with a full-blown broker 49
  • 50. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Integration 50 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 51. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Integration ● Make application agnostic to messaging technology ● Inbound/Outbound AMQP adapters (1-way) ● Inbound/Outbound AMQP gateway (2-way, for request/reply) ● AMQP-backed channel implementation ● Enterprise Integration Patterns ● Based on Spring AMQP ● Foundation for Spring Cloud Stream 51
  • 52. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream 52 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 53. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream ● Opinionated framework for message-driven microservices ● Builds on top Spring Boot and Spring Integration ● Concepts: ● Input and output bindings for integration ● Processor for application logic ● Consumer groups and partitioning for scaling 53 Spring Cloud Stream Spring Integration Spring Boot Spring AMQP
  • 54. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Stream ● Where does RabbitMQ fit? ● It binds Spring Cloud Stream applications to each other ● Goodies: partitioning, dead lettering, batch sending, etc 54 Spring Cloud Stream Application Spring Cloud Stream Application
  • 55. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Data Flow 55 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 56. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Data Flow ● A place to deploy your streams ● Run the stream applications on a variety of runtime platforms ● RabbitMQ is the messaging middleware broker that connects applications 56 Spring Cloud Data Flow SCS App SCS App SCS App SCS App SCS App SCS App Apps run on Cloud Foundry, Kubernetes, Mesos, YARN
  • 57. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud 57 Spring AMQP Spring Boot Reactor Spring Spring Integration Spring Cloud Spring Cloud Data Flow
  • 58. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud ● Many projects… ● Spring Cloud Config 58 Spring Cloud Config ApplicationApplicationApplicationGit Get ${...}
  • 59. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuration Refresh ● Update @Refresh beans on configuration change ● Use Spring Cloud Config and Spring Cloud Bus 59 Spring Cloud Config ApplicationGit Get ${...} Push Consume configuration updates POST /monitor
  • 60. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda ● RabbitMQ update ● RabbitMQ in Spring and Reactor worlds ● Tips for the best RabbitMQ development experience 60
  • 61. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Tips for the RabbitMQ Spring developer ● Tame the runtime: seamless RabbitMQ installation on your dev workstation ● Design properly: avoid common pitfalls ● Ship confidently: simulate your workload with PerfTest 61
  • 62. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ installation: Erlang ● RabbitMQ is written in Erlang ● Erlang applications run on the Erlang Virtual Machine ● How to install Erlang? ● On server: use ESL or RabbitMQ Team native packages ● On dev workstation: use packages or kerl 62
  • 63. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Erlang installation with kerl ● Kerl compiles and installs Erlang SDK ● Why not native packages/installers? ● They don’t always ship with the latest patch release ● Hard to have different Erlang versions on the same machine ● Think of kerl as a SDKMAN! for Erlang 63
  • 64. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Erlang installation with kerl ● Compile Erlang patch release from GitHub: ● List the builds on the current machine: 64 $ kerl build git https://github.com/erlang/otp.git OTP-20.3.4 20.3.4 $ kerl list builds git,19.1.1 git,19.1.5 git,19.2 git,19.2.3 git,20.0.1 git,20.3.4
  • 65. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ RabbitMQ installation ● How to install RabbitMQ? ● On server: use RabbitMQ Team native packages ● On dev workstation: use packages or generic Unix binary ● Generic Unix binary ● For Linux, Unix, macOS ● Easy way to have several versions on the same machine 65
  • 66. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ With the previous tips... ● Make development easier ● Use different Erlang and RabbitMQ versions ● Test migration scenarios locally ● Start several nodes and cluster them locally 66
  • 67. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Design tips: consuming ● Use auto-acknowledgment only with fast consumers ● Use acknowledgment and set quality of service (QoS) properly ● QoS: number of unacknowledged messages for a client channel ● Prevent overflowing a client with messages ● Make load balancing between consumers better ● Don’t use 1 for QoS, as it usually under-utilizes consumers 67
  • 68. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Design tips: scaling ● A queue has a limited throughput ● It’s an Erlang process ( ~ Java thread) ● Scale by using several queues ● Random/Consistent hash exchange, sharding plugin, Spring Cloud Stream partition implementation ● Use top plugin to identify bottlenecks ● Process with the highest “Reductions / sec” is most likely a bottleneck 68
  • 69. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Workload simulation with PerfTest ● PerfTest is a throughput testing tool ● It can simulate simple to advanced workloads ● Now an independent project (used to ship with the Java client) ● Uses the Java client ● Eat your own dog food ● Used internally for our long-running environments and use-case-oriented workloads 69
  • 70. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ PerfTest overview ● Configurable publishing and consuming rates ● Topology creation and configuration (exchanges, bindings, queues) ● Message latency calculation ● Consumer latency configuration ● Custom message content to simulate real messages ● TLS configuration support ● Connection and topology recovery support ● Fine-grained threading options for typical IoT workloads ● Monitoring support through Micrometer ● Cloud Foundry template project 70
  • 71. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Simulate throughput workload 10 producers sending 1000 messages / second 10 consumers 10 queues (perf-test-1, perf-test-2, … perf-test-10) 71 $ ./runjava com.rabbitmq.perf.PerfTest --rate 1000 --producers 10 --consumers 10 --queue-pattern 'perf-test-%d' --queue-pattern-from 1 --queue-pattern-to 10
  • 72. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Simulating IoT workloads ● 10 Ks, 100 Ks connections ● Puts a lot of pressure on the broker… and on the testing tool as well! ● Resource on the testing tool side: ● Memory ● Threads ● Files descriptors (connections) ● Serious optimizations needed to avoid using 10s, 100s of testing instances 72
  • 73. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Simulate IoT workload 100 producers sending 1 message every 5 seconds Each producer starts between 1 and 120 seconds 300 consumers 100 queues (perf-test-001, perf-test-002, … perf-test-100) => ~ 1 K threads 73 $ ./runjava com.rabbitmq.perf.PerfTest --publishing-interval 5 --producer-random-start-delay 120 --producers 100 --consumers 300 --queue-pattern 'perf-test-%03d' --queue-pattern-from 1 --queue-pattern-to 100
  • 74. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Simulate (bigger) IoT workload 1000 producers sending 1 message every 30 seconds Each producer starts between 1 and 300 seconds 3000 consumers 1000 queues (perf-test-0001, perf-test-0002, … perf-test-1000) => ~ 150 threads 74 $ ./runjava com.rabbitmq.perf.PerfTest --publishing-interval 30 --producer-random-start-delay 300 --producers 1000 --consumers 3000 --queue-pattern 'perf-test-%04d' --queue-pattern-from 1 --queue-pattern-to 1000 --heartbeat-sender-threads 10 --nio-threads 20 --consumers-thread-pools 100
  • 75. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Monitoring with PerfTest ● Expose PerfTest clients metrics, as well as JVM and OS metrics ● JMX, Datadog, and Prometheus supported so far 75 $ ./runjava com.rabbitmq.perf.PerfTest --metrics-prometheus
  • 76. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ PerfTest dashboard with Grafana 76
  • 77. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Wrapping up ● RabbitMQ present in many places in Spring & Reactor stacks ● First-class support and integration ● Continuous effort to bring and maintain this support 77
  • 78. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Questions? 78
  • 79. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Thank you! 79
  • 80. © 2013-2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Resources Code sample: https://github.com/acogoluegnes/spring-rabbitmq RabbitMQ: http://www.rabbitmq.com/ RabbitMQ Java client: https://github.com/rabbitmq/rabbitmq-java-client Reactor RabbitMQ: https://github.com/reactor/reactor-rabbitmq Hop: https://github.com/rabbitmq/hop Kerl: https://github.com/kerl/kerl QoS: https://www.rabbitmq.com/blog/2012/05/11/some-queuing-theory-throughput-latency-and-bandwidth/ Queues in RabbitMQ: https://www.rabbitmq.com/queues.html#runtime-characteristics PerfTest: https://github.com/rabbitmq/rabbitmq-perf-test/ PerfTest and IoT workloads: https://rabbitmq.github.io/rabbitmq-perf-test/stable/htmlsingle/#simulating-high-loads 80