SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
A High-Speed Data Ingestion Service in
Java Using MQTT, AMQP, and STOMP
JCON OpenBlend Slovenia 2023
Juarez Barbosa Junior - @juarezjunior
Sr. Principal Java Developer Evangelist
ORACLE
June 2023
Copyright © 2023, Oracle and/or its affiliates
About me
• Juarez Barbosa Junior - @juarezjunior
• Senior Principal Java Developer Evangelist
• Over 20 years of experience in IT
• SW Engineering, Developer Relations
• Microsoft, Oracle, IBM, Nokia, Unisys, Accenture, and a
few startups
• Microsoft Azure Developer Relations Lead
• IBM Watson Tech Evangelist & Cloud Rockstar
• IBM Mobile Tech Evangelist & Global Thought Leader
• Nokia Developers Global Champion
• Lead Software/DevOps Architect
• Expertise
• Java, Cloud, DevOps, Cloud-native, Blockchain
Copyright © 2023, Oracle and/or its affiliates
Agenda
• Java App Dev with Oracle Database
• Support for the Latest Java Versions
• MOM, ActiveMQ, AMQP, MQTT, STOMP, REST
• Reactive Streams Ingestion (RSI) and RSI PushPublisher
• ActiveMQ and JMS Message Consumer
• Sample Architecture
• Project Structure
• Demo: Running the Sample App
• Live Labs
• Free Oracle Cloud Account
• Oracle ACE Program
• Thank you – Juarez Jr
Copyright © 2023, Oracle and/or its affiliates
Copyright © 2023, Oracle and/or its affiliates
Java App Dev with Oracle Database
Copyright © 2023, Oracle and/or its affiliates
Overview of Oracle DB Access with Java
User
Java
Code
JDBC
Reactive
Extension Standard
JDBC API
R2DBC
+
3rd party
Reactive
Streams
Libraries
Async call with non-blocking
backpressure
operators (map, reduce, filters),
concurrency modeling,
monitoring, tracing
Implements Java SE
reactive stream
interface (Flow)
Full Reactive
Streams
Sync/blocking JDBC calls
Java
Business
Logic
User Java code
Oracle
Database
Oracle JDBC
driver
VTs/lightweight JDBC calls
Copyright © 2023, Oracle and/or its affiliates
Support for the Latest Java Versions
• Java 11 - native support, compiled with it
• Java 17 - certified
• JDBC Standards - 4.2 and 4.3
• GraalVM - native image instrumentation
• Reactive Streams - Java Flow API support
• Project Loom - Virtual Threads support
• Data access is critical in mission-critical apps
Copyright © 2023, Oracle and/or its affiliates
MOM - Message-Oriented Middleware
• A middleware component that allows
communication and exchanges the data
(messages).
• It involves passing data between applications
using a communication channel that carries self-
contained units of information (messages).
• In a MOM-based communication environment,
messages are sent and received asynchronously.
• MOM -> Apache ActiveMQ
AMQP – Advanced Message
Queuing Protocol
• The Advanced Message Queuing Protocol
(AMQP) is an open standard for passing
business messages between applications or
organizations.
• Realize the savings commoditization
brings; remove vendor lock-in
• Connect applications on different
platforms; choose the right platform for
the job
• Connect to business partners using a full-
featured open standard; remove
technical barriers to trade
• Position for innovations built upon the
foundation of AMQP
• Security, Reliability, Interoperability,
Standard, Openness
Copyright © 2023, Oracle and/or its affiliates
MQTT – Message Queuing
Telemetry Transport
• An OASIS standard messaging protocol for
the Internet of Things (IoT). It is designed as
an extremely lightweight publish/subscribe
messaging transport that is ideal for
connecting remote devices with a small code
footprint and minimal network bandwidth.
Copyright © 2023, Oracle and/or its affiliates
STOMP – Simple (or
Streaming) Text Orientated
Messaging Protocol
• STOMP provides an interoperable wire
format so that STOMP clients can
communicate with any STOMP message
broker to provide easy and widespread
messaging interoperability among many
languages, platforms and brokers..
Copyright © 2023, Oracle and/or its affiliates
Copyright © 2022, Oracle and/or its affiliates
Reactive Streams Ingestion (RSI)
⚫ Java Library for Reactive Streams Ingestion
⚫ Streaming capability: Ingest data in an unblocking, and
reactive way from a large group of clients
⚫ Group records through RAC (Real App Clusters),
and Shard affinity using native UCP (Universal Connection
Pool)
⚫ Optimize CPU allocation while decoupling record
Processing from I/O
⚫ Fastest insert method for the Oracle Database through
Direct Path Insert, bypassing SQL and writing directly into the DB files
Copyright © 2023, Oracle and/or its affiliates
Reactive Streams Ingestion (RSI)
⚫ PushPublisher API
// Push Publisher for Simple Usage
PushPublisher<Customer> pushPublisher =
ReactiveStreamsIngestion.pushPublisher();
pushPublisher.subscribe(rsi.subscriber());
// Ad-hoc usage
pushPublisher.accept(
new Customer(1, "John Doe", "North"));
// As a Consumer of a Stream
Customer[] customers = …
Stream
.of(customers)
.filter(c -> c.region.equals("NORTH"))
.forEach(pushPublisher::accept);
// As a Consumer for 3rd party Reactive Stream
// Libraries eg: Reactor https://projectreactor.io/
Flux
.just(
new Customer(1, "John Doe", "North"),
new Customer(2, "Jane Smith", "South"))
.concatWithValues(new Customer(3, "Bob", "South"))
.doOnComplete(() -> {System.out.println("Done!");})
.doOnCancel(() -> {System.out.println("Canceled!");})
.subscribe(pushPublisher::accept);
Copyright © 2023, Oracle and/or its affiliates
ActiveMQ & JMS Message Consumer
⚫ ActiveMQ
⚫ ActiveMQ is a Java-based open-source message broker which supports REST API and
various wire-level protocols, such as MQTT, AMQP, and STOMP.
⚫ JMS Message Consumer
⚫ Like with any messaging-based application, you need to create a receiver that will
handle the messages that have been sent. The sample code snippet creates an AMQP
connection that connects to ActiveMQ using the given username, password,
hostname, and port number.
⚫ Port number 5672 is the default port that ActiveMQ is listening to over the AMQP
protocol when it starts up. It also creates a topic subscriber (consumer) to receive
messages that have been published to the "event" topic.
Copyright © 2023, Oracle and/or its affiliates
ActiveMQ & JMS Message Consumer
Copyright © 2023, Oracle and/or its affiliates
Demo: Project Structure
Copyright © 2023, Oracle and/or its affiliates
Demo: Architecture
Oracle LiveLabs
Showcasing how Oracle’s solutions can
solve your business problems
500+
free workshops,
available or in
development
3.5 million
people have already visited
LiveLabs
developer.oracle.com/livelabs
learn something new …at your pace!
600+
events run
using LiveLabs
workshops
Create your FREE
Cloud Account
• Go to
https://signup.cloud.oracle.com/
Copyright © 2023, Oracle and/or its affiliates
3 membership tiers
Connect: @oracleace facebook.com/OracleACEs
aceprogram_ww@oracle.com
500+ technical experts &
community leaders helping peers globally
The Oracle ACE Program recognizes & rewards individuals for
their technical & community contributions to the Oracle community
Nominate
yourself or a candidate:
ace.oracle.com/nominate
Learn more - ace.oracle.com
blogs.oracle.com/ace
Thank you!
20
Copyright © 2023, Oracle and/or its affiliates | Confidential: Internal

Weitere ähnliche Inhalte

Ähnlich wie JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STOMP.pdf

B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
Dr. Wilfred Lin (Ph.D.)
 
ITPC Building Modern Data Streaming Apps
ITPC Building Modern Data Streaming AppsITPC Building Modern Data Streaming Apps
ITPC Building Modern Data Streaming Apps
Timothy Spann
 

Ähnlich wie JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STOMP.pdf (20)

CloudLand - Revolutionize Java DB AppDev with Reactive Streams and Virtual Th...
CloudLand - Revolutionize Java DB AppDev with Reactive Streams and Virtual Th...CloudLand - Revolutionize Java DB AppDev with Reactive Streams and Virtual Th...
CloudLand - Revolutionize Java DB AppDev with Reactive Streams and Virtual Th...
 
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ThreadsDWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
DWX23 - Revolutionize Java DB AppDev with Reactive Streams and Virtual Threads
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptx
 
Java EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudJava EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The Cloud
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
 
Node.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development Techniques
 
Java, app servers and oracle application grid
Java, app servers and oracle application gridJava, app servers and oracle application grid
Java, app servers and oracle application grid
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuing
 
Whats new in Autonomous Database in 2022
Whats new in Autonomous Database in 2022Whats new in Autonomous Database in 2022
Whats new in Autonomous Database in 2022
 
BarcelonaJUG - Revolutionize Java Database Application Development with React...
BarcelonaJUG - Revolutionize Java Database Application Development with React...BarcelonaJUG - Revolutionize Java Database Application Development with React...
BarcelonaJUG - Revolutionize Java Database Application Development with React...
 
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
Porto Tech Hub Conference 2023 - Revolutionize Java DB AppDev with Reactive S...
 
Oracle Keynote Cloud Expo 11-04-09
Oracle Keynote Cloud Expo 11-04-09Oracle Keynote Cloud Expo 11-04-09
Oracle Keynote Cloud Expo 11-04-09
 
ITPC Building Modern Data Streaming Apps
ITPC Building Modern Data Streaming AppsITPC Building Modern Data Streaming Apps
ITPC Building Modern Data Streaming Apps
 
Introducing Java 8
Introducing Java 8Introducing Java 8
Introducing Java 8
 
Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data Java Library for High Speed Streaming Data
Java Library for High Speed Streaming Data
 
AMIS Oracle OpenWorld 2015 Review – part 2- Hardware & IaaS and PaaS Cloud Fo...
AMIS Oracle OpenWorld 2015 Review – part 2- Hardware & IaaS and PaaS Cloud Fo...AMIS Oracle OpenWorld 2015 Review – part 2- Hardware & IaaS and PaaS Cloud Fo...
AMIS Oracle OpenWorld 2015 Review – part 2- Hardware & IaaS and PaaS Cloud Fo...
 
4. J2EE.pptx
4. J2EE.pptx4. J2EE.pptx
4. J2EE.pptx
 
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3
 
OpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio Tavilla
OpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio TavillaOpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio Tavilla
OpenStack Identity - Keystone (liberty) by Lorenzo Carnevale and Silvio Tavilla
 

Mehr von Juarez Junior

Mehr von Juarez Junior (19)

Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADBOracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
Oracle CloudWorld 2023 - How to hook up Telegram with Spring Boot and ADB
 
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
Oracle CloudWorld 2023 - A Practical Guide to Implementing DevOps with IaC fo...
 
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
Oracle CloudWorld 2023 - Multi-cloud App Dev for Java Devs with Microsoft Azu...
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
 
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
jPrime 2023 - Revolutionize Java DB AppDev with Reactive Streams and Virtual ...
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
 
SKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for DatabasesSKILup Days Container Orchestration - Kubernetes Operators for Databases
SKILup Days Container Orchestration - Kubernetes Operators for Databases
 
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
TDC Connections 2023 - Revolutionize Java DB AppDev with Reactive Streams and...
 
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
DTU Global Azure 2023 Bootcamp - Multi-cloud App Dev for Java Developers with...
 
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
Melee Numerique 2022 - Revolutionize Java DB App Dev with Reactive Streams an...
 
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for DatabasesDeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
DeveloperWeekEnterprise2023 - Introduction to Kubernetes Operators for Databases
 
DevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for DatabasesDevConf.cz - Introduction to Kubernetes Operators for Databases
DevConf.cz - Introduction to Kubernetes Operators for Databases
 
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
CloudTalks - Revolutionize Java DB AppDev with Reactive Streams and Virtual T...
 
Cloud Conference Day - Revolutionize Java Database App Development with React...
Cloud Conference Day - Revolutionize Java Database App Development with React...Cloud Conference Day - Revolutionize Java Database App Development with React...
Cloud Conference Day - Revolutionize Java Database App Development with React...
 
DeveloperWeek Europe 2023 - Revolutionize Java DB AppDev with Reactive Stream...
DeveloperWeek Europe 2023 - Revolutionize Java DB AppDev with Reactive Stream...DeveloperWeek Europe 2023 - Revolutionize Java DB AppDev with Reactive Stream...
DeveloperWeek Europe 2023 - Revolutionize Java DB AppDev with Reactive Stream...
 
[pt-BR] - Cloud Conference Day - Agilidade para disponibilização de aplicaçõe...
[pt-BR] - Cloud Conference Day - Agilidade para disponibilização de aplicaçõe...[pt-BR] - Cloud Conference Day - Agilidade para disponibilização de aplicaçõe...
[pt-BR] - Cloud Conference Day - Agilidade para disponibilização de aplicaçõe...
 
Microsoft Azure - GAA and Irish Tech Society Hackathon
Microsoft Azure - GAA and Irish Tech Society HackathonMicrosoft Azure - GAA and Irish Tech Society Hackathon
Microsoft Azure - GAA and Irish Tech Society Hackathon
 
JSNation.com - Azure Static Web Apps (SWA) with Azure DevOps
JSNation.com - Azure Static Web Apps (SWA) with Azure DevOpsJSNation.com - Azure Static Web Apps (SWA) with Azure DevOps
JSNation.com - Azure Static Web Apps (SWA) with Azure DevOps
 
Azure DevOps with DV and GitHub
Azure DevOps with DV and GitHubAzure DevOps with DV and GitHub
Azure DevOps with DV and GitHub
 

Kürzlich hochgeladen

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 

Kürzlich hochgeladen (20)

BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 

JCON OpenBlend Slovenia 2023 - A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STOMP.pdf

  • 1. A High-Speed Data Ingestion Service in Java Using MQTT, AMQP, and STOMP JCON OpenBlend Slovenia 2023 Juarez Barbosa Junior - @juarezjunior Sr. Principal Java Developer Evangelist ORACLE June 2023 Copyright © 2023, Oracle and/or its affiliates
  • 2. About me • Juarez Barbosa Junior - @juarezjunior • Senior Principal Java Developer Evangelist • Over 20 years of experience in IT • SW Engineering, Developer Relations • Microsoft, Oracle, IBM, Nokia, Unisys, Accenture, and a few startups • Microsoft Azure Developer Relations Lead • IBM Watson Tech Evangelist & Cloud Rockstar • IBM Mobile Tech Evangelist & Global Thought Leader • Nokia Developers Global Champion • Lead Software/DevOps Architect • Expertise • Java, Cloud, DevOps, Cloud-native, Blockchain Copyright © 2023, Oracle and/or its affiliates
  • 3. Agenda • Java App Dev with Oracle Database • Support for the Latest Java Versions • MOM, ActiveMQ, AMQP, MQTT, STOMP, REST • Reactive Streams Ingestion (RSI) and RSI PushPublisher • ActiveMQ and JMS Message Consumer • Sample Architecture • Project Structure • Demo: Running the Sample App • Live Labs • Free Oracle Cloud Account • Oracle ACE Program • Thank you – Juarez Jr Copyright © 2023, Oracle and/or its affiliates
  • 4. Copyright © 2023, Oracle and/or its affiliates Java App Dev with Oracle Database
  • 5. Copyright © 2023, Oracle and/or its affiliates Overview of Oracle DB Access with Java User Java Code JDBC Reactive Extension Standard JDBC API R2DBC + 3rd party Reactive Streams Libraries Async call with non-blocking backpressure operators (map, reduce, filters), concurrency modeling, monitoring, tracing Implements Java SE reactive stream interface (Flow) Full Reactive Streams Sync/blocking JDBC calls Java Business Logic User Java code Oracle Database Oracle JDBC driver VTs/lightweight JDBC calls
  • 6. Copyright © 2023, Oracle and/or its affiliates Support for the Latest Java Versions • Java 11 - native support, compiled with it • Java 17 - certified • JDBC Standards - 4.2 and 4.3 • GraalVM - native image instrumentation • Reactive Streams - Java Flow API support • Project Loom - Virtual Threads support • Data access is critical in mission-critical apps
  • 7. Copyright © 2023, Oracle and/or its affiliates MOM - Message-Oriented Middleware • A middleware component that allows communication and exchanges the data (messages). • It involves passing data between applications using a communication channel that carries self- contained units of information (messages). • In a MOM-based communication environment, messages are sent and received asynchronously. • MOM -> Apache ActiveMQ
  • 8. AMQP – Advanced Message Queuing Protocol • The Advanced Message Queuing Protocol (AMQP) is an open standard for passing business messages between applications or organizations. • Realize the savings commoditization brings; remove vendor lock-in • Connect applications on different platforms; choose the right platform for the job • Connect to business partners using a full- featured open standard; remove technical barriers to trade • Position for innovations built upon the foundation of AMQP • Security, Reliability, Interoperability, Standard, Openness Copyright © 2023, Oracle and/or its affiliates
  • 9. MQTT – Message Queuing Telemetry Transport • An OASIS standard messaging protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth. Copyright © 2023, Oracle and/or its affiliates
  • 10. STOMP – Simple (or Streaming) Text Orientated Messaging Protocol • STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers.. Copyright © 2023, Oracle and/or its affiliates
  • 11. Copyright © 2022, Oracle and/or its affiliates Reactive Streams Ingestion (RSI) ⚫ Java Library for Reactive Streams Ingestion ⚫ Streaming capability: Ingest data in an unblocking, and reactive way from a large group of clients ⚫ Group records through RAC (Real App Clusters), and Shard affinity using native UCP (Universal Connection Pool) ⚫ Optimize CPU allocation while decoupling record Processing from I/O ⚫ Fastest insert method for the Oracle Database through Direct Path Insert, bypassing SQL and writing directly into the DB files
  • 12. Copyright © 2023, Oracle and/or its affiliates Reactive Streams Ingestion (RSI) ⚫ PushPublisher API // Push Publisher for Simple Usage PushPublisher<Customer> pushPublisher = ReactiveStreamsIngestion.pushPublisher(); pushPublisher.subscribe(rsi.subscriber()); // Ad-hoc usage pushPublisher.accept( new Customer(1, "John Doe", "North")); // As a Consumer of a Stream Customer[] customers = … Stream .of(customers) .filter(c -> c.region.equals("NORTH")) .forEach(pushPublisher::accept); // As a Consumer for 3rd party Reactive Stream // Libraries eg: Reactor https://projectreactor.io/ Flux .just( new Customer(1, "John Doe", "North"), new Customer(2, "Jane Smith", "South")) .concatWithValues(new Customer(3, "Bob", "South")) .doOnComplete(() -> {System.out.println("Done!");}) .doOnCancel(() -> {System.out.println("Canceled!");}) .subscribe(pushPublisher::accept);
  • 13. Copyright © 2023, Oracle and/or its affiliates ActiveMQ & JMS Message Consumer ⚫ ActiveMQ ⚫ ActiveMQ is a Java-based open-source message broker which supports REST API and various wire-level protocols, such as MQTT, AMQP, and STOMP. ⚫ JMS Message Consumer ⚫ Like with any messaging-based application, you need to create a receiver that will handle the messages that have been sent. The sample code snippet creates an AMQP connection that connects to ActiveMQ using the given username, password, hostname, and port number. ⚫ Port number 5672 is the default port that ActiveMQ is listening to over the AMQP protocol when it starts up. It also creates a topic subscriber (consumer) to receive messages that have been published to the "event" topic.
  • 14. Copyright © 2023, Oracle and/or its affiliates ActiveMQ & JMS Message Consumer
  • 15. Copyright © 2023, Oracle and/or its affiliates Demo: Project Structure
  • 16. Copyright © 2023, Oracle and/or its affiliates Demo: Architecture
  • 17. Oracle LiveLabs Showcasing how Oracle’s solutions can solve your business problems 500+ free workshops, available or in development 3.5 million people have already visited LiveLabs developer.oracle.com/livelabs learn something new …at your pace! 600+ events run using LiveLabs workshops
  • 18. Create your FREE Cloud Account • Go to https://signup.cloud.oracle.com/ Copyright © 2023, Oracle and/or its affiliates
  • 19. 3 membership tiers Connect: @oracleace facebook.com/OracleACEs aceprogram_ww@oracle.com 500+ technical experts & community leaders helping peers globally The Oracle ACE Program recognizes & rewards individuals for their technical & community contributions to the Oracle community Nominate yourself or a candidate: ace.oracle.com/nominate Learn more - ace.oracle.com blogs.oracle.com/ace
  • 20. Thank you! 20 Copyright © 2023, Oracle and/or its affiliates | Confidential: Internal