![Page 1: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/1.jpg)
RabbitMQ and OpenStack: what’s new!OpenInfra Day - Rome 3 Oct 2019
Gabriele Santomaggio @gsantomaggio
SUSE became the largest independent company in the open source market
![Page 2: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/2.jpg)
About me..
● Senior software developer @SUSE● Part of Oslo-Messaging core team
○ issues/features for RabbitMQ ● RabbitMQ Member/Supporter● Co-Author of RabbitMQ cookbook● RabbitMQ on Kubernetes
RabbitMQ and OpenStack
![Page 3: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/3.jpg)
Agenda
● Quick introduction● What’s new in OpenStack - Oslo Messaging● Demo● What’s new in RabbitMQ 3.8● Live view
RabbitMQ and OpenStack
![Page 4: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/4.jpg)
OpenStack - Messaging systems
OpenStack can use different messaging system, RabbitMQ is one of the most used.
Core component
RabbitMQ and OpenStack - Introduction
![Page 5: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/5.jpg)
OpenStack and DRP calls
RabbitMQ and OpenStack - Introduction
Module-Client sends a message/command and waits
Message ended up to one queue
Module-Server executes the operations
reply_xxxx queue
RabbitMQ
Reply within
timeoutotherwise raise
timeout error
Send- timeout
Operations
OK or Error
![Page 6: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/6.jpg)
Messaging LibraryThe OpenStack messaging library is Oslo-Messaging[1]
RabbitMQ and OpenStack - Introduction
1-https://github.com/openstack/oslo.messaging
![Page 7: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/7.jpg)
RabbitMQ and Messages without destinations...
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
Producer exchange queue(2)
RabbitMQ
RabbitMQ does not raise any callback/error (unless the Mandatory Flag is set)
![Page 8: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/8.jpg)
RabbitMQ and Messages without destinations...
How does OpenStack handle this case?
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
It does not!
Until now..
![Page 9: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/9.jpg)
Transport Options (10.2.0) [1]
● Add custom parameters to the drivers[1]● Currently used only in RabbitMQ driver
○ Mandatory Flag (for unroutable messages)● Add new error (MessageUndeliverable)
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
1-https://blueprints.launchpad.net/oslo.messaging/+spec/transport-options
![Page 10: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/10.jpg)
The codeoptions = oslo_messaging.TransportOptions(at_least_once=True)
client = oslo_messaging.RPCClient(transport, target, transport_options=options)
// at_least_once will be translated in Mandatory Flag in RabbitMQ
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
![Page 11: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/11.jpg)
Demo
RabbitMQ and OpenStack - Introduction
Module-Client sends a message/command and waits
Message ended up to one queue
Module-Server executes the operations
reply_xxxx queue
RabbitMQ
Send- timeout
MessagingTimeout: Timed out waiting for a reply to message ID MessageUndeliverable error
![Page 12: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/12.jpg)
RPC TimeOut "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 318, in wait message = self.waiters.get(msg_id, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 223, in get 'to message ID %s' % msg_id)
MessagingTimeout: Timed out waiting for a reply to message ID
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
Application Error, nothing to do with RabbitMQ
![Page 13: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/13.jpg)
Problem Heartbeat
“Too many heartbeats missed”
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
![Page 14: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/14.jpg)
Heartbeat improvement
● Run heartbeat in a native thread[1]● “Too many heartbeats missed”● Still experimental
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
1-https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/impl_rabbit.py#L475
![Page 15: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/15.jpg)
Fixed bug in SSL module [1] (9.5.0)
● Too many heartbeats missed● MessagingTimeout: Timed out waiting for a
reply to message ID● Modules crash - memory allocation● Credit to SUSE :)
RabbitMQ and OpenStack - What’s new in Oslo-Messaging
1-+bug/1800957
![Page 16: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/16.jpg)
● What’s new in RabbitMQ
Second part
RabbitMQ and OpenStack - What’s new in RabbitMQ
![Page 17: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/17.jpg)
● Quorum Queues● Observability● Single Active Consumer● Feature Flags
RabbitMQ 3.8
RabbitMQ and OpenStack - What’s new in RabbitMQ
![Page 18: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/18.jpg)
● Implement RAFT protocol (consensus algorithm)● No ring topology, parallel replication● More stable in case of failures
Quorum Queues [1]
RabbitMQ and OpenStack - What’s new in RabbitMQ
1-https://www.rabbitmq.com/quorum-queues.html
![Page 19: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/19.jpg)
● New metrics for Erlang● Unroutable messages● Built-in Prometheus support (Grafana templates)
Observability
RabbitMQ and OpenStack - What’s new in RabbitMQ
![Page 20: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/20.jpg)
● https://github.com/rabbitmq/rabbitmq-prometheus ● Easy to deploy in K8s● Easy to integrate prometheus
Native prometheus plugin
RabbitMQ and OpenStack - What’s new in RabbitMQ
![Page 21: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/21.jpg)
RabbitMQ Grafana Overview
RabbitMQ Grafana Erlang
RabbitMQ Grafana RAFT
Live View
RabbitMQ and OpenStack - What’s new in RabbitMQ
![Page 22: RabbitMQ and OpenStack: what’s new! SUSE became the ... · options = oslo_messaging.TransportOptions(at_least_once=True) client = oslo_messaging.RPCClient(transport, target, transport_options=options)](https://reader034.vdocument.in/reader034/viewer/2022043014/5fb20a467ce3392fa6475de1/html5/thumbnails/22.jpg)
@gsantomaggio