This document provides an overview of Spring RabbitMQ. It discusses messaging basics and RabbitMQ concepts like exchanges, queues, bindings. It then summarizes the Spring AMQP and Spring Integration frameworks for integrating RabbitMQ in Spring applications. Spring AMQP provides the RabbitAdmin, listener container and RabbitTemplate for declaring and interacting with RabbitMQ components. The document contains code examples for configuring RabbitMQ and consuming/producing messages using Spring AMQP.
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
2011-11-02 | 05:45 PM - 06:35 PM
The JMS standard is 9 years old - but outside the Java community innovation is happening. The AMQP standard with implementations like RabbitMQ is gaining more and more traction. This session explains the standard and its advantages. It will also show how an AMQP application can be implemented using Java.
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQTanya Denisyuk
In this talk I am going to show how to build a system that can ingest data produced at separate geo located areas (think AWS and it’s many regions) and replicate it to a central cluster where it can be further processed and analysed. I will present an example of how to build a system like this one by using RabbitMQ Federation to replicate data across AWS Regions and RabbitMQ support for many protocols to produce/consume data.
To help with scalability I am going to show an interesting way to implement sharded queues with RabbitMQ by using the Consistent Hash Exchange.
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
Do you need to process thousands of images in the background for your web app?
Do you need to share data across multiple applications, probably written in different languages and sitting at different servers?
Your real time data feed is becoming slow because you are polling the database constantly for new data updates?
Do you need to scale information processing during peek times?
What about deploying new features with zero downtime? If any of these problems sound familiar then you probably need to use messaging in your application.
In this talk I will introduce RabbitMQ, a messaging and queue server that can help us tackle those problems. We will learn the benefits of a Queue Server and see how to integrate messaging into our applications. With this talk we hope that the term 'decoupling' gets a new, broader, meaning.
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
2011-11-02 | 05:45 PM - 06:35 PM
The JMS standard is 9 years old - but outside the Java community innovation is happening. The AMQP standard with implementations like RabbitMQ is gaining more and more traction. This session explains the standard and its advantages. It will also show how an AMQP application can be implemented using Java.
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQTanya Denisyuk
In this talk I am going to show how to build a system that can ingest data produced at separate geo located areas (think AWS and it’s many regions) and replicate it to a central cluster where it can be further processed and analysed. I will present an example of how to build a system like this one by using RabbitMQ Federation to replicate data across AWS Regions and RabbitMQ support for many protocols to produce/consume data.
To help with scalability I am going to show an interesting way to implement sharded queues with RabbitMQ by using the Consistent Hash Exchange.
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
Do you need to process thousands of images in the background for your web app?
Do you need to share data across multiple applications, probably written in different languages and sitting at different servers?
Your real time data feed is becoming slow because you are polling the database constantly for new data updates?
Do you need to scale information processing during peek times?
What about deploying new features with zero downtime? If any of these problems sound familiar then you probably need to use messaging in your application.
In this talk I will introduce RabbitMQ, a messaging and queue server that can help us tackle those problems. We will learn the benefits of a Queue Server and see how to integrate messaging into our applications. With this talk we hope that the term 'decoupling' gets a new, broader, meaning.
In this talk, we will cover best practices in running RabbitMQ, things you should avoid doing, lesser known features, recent operations improvements and a bit of what's ahead.
Given in October, 2015.
The session presents in the details the RabbitMQ message broker along with demonstrations using the Java client, the Spring integration for RabbitMQ and the administration tools provided as part of the RabbitMQ installation.
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)James Titcumb
RabbitMQ is a message broker - an application that allows communication between applications by way of a message queuing system. In this talk, we’ll set up an RabbitMQ instance, take an intermediate-level look into the technical features it provides and also how you can apply RabbitMQ in your in applications to scale them efficiently.
Messaging Standards and Systems - AMQP & RabbitMQAll Things Open
All Things Open 2014 - Day 1
Wednesday, October 22nd, 2014
Gavin Roy
VP of Architecture for AWeber Communications
Back Dev
Messaging Standards and Systems - AMQP & RabbitMQ
Find more by Gavin here: https://speakerdeck.com/gmr
Introduction to RabbitMQ, Amqp and some messaging patterns.
Easy to follow code examples step by step provided.
Sample code and escenarios can be found at: https://gist.github.com/javierarilos/9348168
RabbitMQ is an open source message-broker software that originally implemented the Advanced Message Queuing Protocol (AMQP).it accepts and forwards messages.
Following up from AMQP presentation, this is a more in-depth coverage of RabbitMQ with workshop-style walkthrough, covering various aspects of the system.
A presentation from internal meeting on Message Broker System and RabbitMQ. RabbitMQ is open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).
Internet companies with huge traffic and millions of users have tasks involved that cannot be served in a request. RabbitMQ can process tasks or communication between different app components asynchronously but close to real time.
PPT concetrates on :
1. Introduction to RabbitMQ .
2. Difference between AMQP and JMS
3. Different types of exchanges
4. Routing Key and Binding concept
In this talk, we will cover best practices in running RabbitMQ, things you should avoid doing, lesser known features, recent operations improvements and a bit of what's ahead.
Given in October, 2015.
The session presents in the details the RabbitMQ message broker along with demonstrations using the Java client, the Spring integration for RabbitMQ and the administration tools provided as part of the RabbitMQ installation.
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)James Titcumb
RabbitMQ is a message broker - an application that allows communication between applications by way of a message queuing system. In this talk, we’ll set up an RabbitMQ instance, take an intermediate-level look into the technical features it provides and also how you can apply RabbitMQ in your in applications to scale them efficiently.
Messaging Standards and Systems - AMQP & RabbitMQAll Things Open
All Things Open 2014 - Day 1
Wednesday, October 22nd, 2014
Gavin Roy
VP of Architecture for AWeber Communications
Back Dev
Messaging Standards and Systems - AMQP & RabbitMQ
Find more by Gavin here: https://speakerdeck.com/gmr
Introduction to RabbitMQ, Amqp and some messaging patterns.
Easy to follow code examples step by step provided.
Sample code and escenarios can be found at: https://gist.github.com/javierarilos/9348168
RabbitMQ is an open source message-broker software that originally implemented the Advanced Message Queuing Protocol (AMQP).it accepts and forwards messages.
Following up from AMQP presentation, this is a more in-depth coverage of RabbitMQ with workshop-style walkthrough, covering various aspects of the system.
A presentation from internal meeting on Message Broker System and RabbitMQ. RabbitMQ is open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).
Internet companies with huge traffic and millions of users have tasks involved that cannot be served in a request. RabbitMQ can process tasks or communication between different app components asynchronously but close to real time.
PPT concetrates on :
1. Introduction to RabbitMQ .
2. Difference between AMQP and JMS
3. Different types of exchanges
4. Routing Key and Binding concept
Writing Java Stored Procedures in Oracle 12cMartin Toshev
The session discusses the innerworkings ot the Oracle Aurora JVM, the process of writing and maintaining Java stored procedures and the new features in Oracle database 12c.
Introductory presentation for the Clash of Technologies: RxJS vs RxJava event organized by SoftServe @ betahouse (17.01.2015). Comparison document with questions & answers available here: https://docs.google.com/document/d/1VhuXJUcILsMSP4_6pCCXBP0X5lEVTsmLivKHcUkFvFY/edit#.
Eclipse plug-in development seminar held by the Bulgarian Java User group covering basic aspects of Eclipse plug-in development and the new stuff in e4
The feature we always hear about whenever Java 9 is in the news is Jigsaw, modularity. But this doesn't scratch the
same developer itch that Java 8's lambdas and streams did, and we're left with a vague sensation that the next version might not be that interesting.
Java 9 actually has a lot of great additions and changes to make development a bit nicer. These features can't be lumped under an umbrella term like Java 8's lambdas and streams, the changes are scattered throughout the APIs and language features that we regularly use.
In this presentation Trisha will show, via live coding:
- How we can use the new Flow API to utilise Reactive Programming
- How the improvements to the Streams API make it easier to control real-time streaming data
- How to the Collections convenience methods simplify code
Along the way we'll bump into other Java 9 features, including some of the additions to interfaces and changes to deprecation. We’ll see that once you start using Java 9, you can't go back to Before.
Presentation on the new features introduced in JDK 8, presented on the 26.02.2013 in Sofia University in front of students and members of the Bulgarian java user group.
Overview for RabbitMQ with AMQP protocol and a discussion for the AMQP model with message properties and publish and consume message
types of exchange
main properties of the queue
Reliable communication is essential for microservice based architectures. One of the most effective patterns for microservices communication is message queue. We'll see how a Rubyist can build scalable microservices using RabbitMQ and run it on the AWS infrastructure in Docker containers.
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
Seminar "Modularity of the Java Platform" of the Bulgarian Java User Group.
Topics of the seminar:
Modularity 101
Modularity on top of the platform: OSGi
Modularity of the platform: Jigsaw
OSGi and Jigsaw interoperability: Penrose
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
7. Messaging Basics
• Messaging provides a mechanism for loosely-
coupled integration of systems
• The central unit of processing in a message is a
message which typically contains a body and a
header
8. Messaging Basics
• Use cases include:
– Log aggregation between systems
– Event propagation between systems
– Offloading long-running tasks to worker nodes
9. Messaging Basics
• Messaging solutions implement different
protocols for transferring of messages such as
AMQP, XMPP, MQTT and many others
• The variety of protocols implies vendor lock-in
when using a particular messaging solution (also
called a messaging broker)
10. Messaging Basics
• A variety of messaging brokers can be a choice for
applications …
11. Messaging Basics
• Messaging solutions provide means for:
– securing message transfer, authenticating and
authorizing messaging endpoints
– routing messages between endpoints
– subscribing to the broker
13. RabbitMQ Overview
• An open source message broker written in Erlang
• Implements the AMQP Protocol (Advanced
Message Queueing Protocol)
• Has a pluggable architecture and provides
extension for other protocols such as HTTP,
STOMP and MQTT
14. RabbitMQ Overview
• AMQP is a binary protocol that aims to
standardize middleware communication
• The AMQP protocol derives its origins from the
financial industry - processing of large volumes of
financial data between different systems is a
classic use case of messaging
15. RabbitMQ Overview
• The AMQP protocol defines:
– exchanges – the message broker endpoints that receive messages
– queues – the message broker endpoints that store messages from
exchanges and are used by subscribers for retrieval of messages
– bindings – rules that bind exchanges and queues
• The AMQP protocol is programmable – which
means that the above entities can be
created/modified/deleted by applications
16. RabbitMQ Overview
• The AMQP protocol defines multiple connection
channels inside a single TCP connection in order
to remove the overhead of opening a large
number of TCP connections to the message
broker
19. RabbitMQ Overview
• Each message can be published with a routing
key
• Each binding between an exchange and a queue
has a binding key
• Routing of messages is determined based on
matching between the routing and
binding keys
20. RabbitMQ Overview
• Different types of messaging patterns are
implemented by means of different types of
exchanges
• RabbitMQ provides the following types of
exchanges:
– default
– direct
– fanout
– topic
– headers
21. RabbitMQ Overview
• A default exchange has the empty string as a
name and routes messages to a queue if the
routing key of the message matches the queue
name (no binding needs to be declared between
a default exchange and a queue)
• Default exchanges are suitable for point-to-point
communication between endpoints
23. RabbitMQ Overview
• A direct exchange routes messages to a queue if
the routing key of the message matches the
binding key between the direct exchange and the
queue
• Direct exchanges are suitable for point-to-point
communication between endpoints
25. RabbitMQ Overview
• A fanout exchange routes (broadcasts) messages
to all queues that are bound to it (the binding key
is not used)
• Fanout exchanges are suitable for publish-
subscribe communication between endpoints
27. RabbitMQ Overview
• A topic exchange routes (multicasts) messages to
all queues that have a binding key (can be a
pattern) that matches the routing key of the
message
• Topic exchanges are suitable for routing messages
to different queues based on the type of message
29. RabbitMQ Overview
• A headers exchange routes messages based on a
custom message header
• Header exchanges are suitable for routing
messages to different queues based on more
than one attribute
30. RabbitMQ Overview
• Apart from queues, exchanges and bindings we
can also manage the following types of
components:
– vhosts – for logical separation of broker components
– users
– parameters (e.g. for defining upstream links to
another brokers)
– policies (e.g. for queue mirroring)
31. RabbitMQ Overview
• Administration of а single instance or an entire
cluster can be performed in several ways:
– using the management Web interface
– using the management HTTP API
– using the rabbitmq-admin.py script
– using the rabbitmqctl utility
32. RabbitMQ Overview
• RabbitMQ provides clustering support that allows
new RabbitMQ nodes to be added on the fly
• Clustering by default does not guarantee that
message loss may not occur
33. RabbitMQ Overview
• Default clustering mechanism provides scalability
in terms of queues rather than high availability
• Mirrored queues are an extension to the default
clustering mechanism that can be used to
establish high availability at the broker level
36. Spring RabbitMQ
• The Spring Framework provides support for
RabbitMQ by means of:
– The Spring AMQP framework
– The Spring Integration framework
– The Spring XD framework
37. Spring RabbitMQ
• The Spring AMQP framework provides:
– RabbitAdmin class for automatically declaring queues, exchanges and
bindings
– Listener container for asynchronous processing of inbound messages
– RabbitTemplate class for sending and receiving messages
38. Spring RabbitMQ
• Utilities of the Spring AMQP framework can be
used either directly in Java or preconfigured in
the Spring configuration
• The Spring Integration framework provides
adapters for the AMQP protocol
39. Spring RabbitMQ
• The following Maven dependency can be used to
provide the Spring AMQP framework to the
application:
<dependencies>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.4.5.RELEASE</version>
</dependency>
</dependencies>
40. Spring RabbitMQ
• RabbitAdmin (plain Java):
CachingConnectionFactory factory = new
CachingConnectionFactory("localhost");
RabbitAdmin admin = new RabbitAdmin(factory);
Queue queue = new Queue("sample-queue");
admin.declareQueue(queue);
TopicExchange exchange = new TopicExchange("sample-topic-
exchange");
admin.declareExchange(exchange);
admin.declareBinding(BindingBuilder.bind(queue).to(exchange)
.with("sample-key"));
factory.destroy();
41. Spring RabbitMQ
• Container listener (plain Java):
CachingConnectionFactory factory =
new CachingConnectionFactory(
"localhost");
SimpleMessageListenerContainer container = new
SimpleMessageListenerContainer(
factory);
Object listener = new Object() {
public void handleMessage(String message) {
System.out.println("Message received: " +
message);
}};
MessageListenerAdapter adapter = new
MessageListenerAdapter(listener);
container.setMessageListener(adapter);
container.setQueueNames("sample-queue");
container.start();
42. Spring RabbitMQ
• RabbitTemplate (plain Java):
CachingConnectionFactory factory =
new CachingConnectionFactory("localhost");
RabbitTemplate template = new
RabbitTemplate(factory);
template.convertAndSend("", "sample-queue",
"sample-queue test message!");
43. Spring RabbitMQ
• All of the above examples can be configured
using Spring configuration
• Cleaner and decouples RabbitMQ configuration
for the business logic
44. Spring RabbitMQ
• The following Maven dependency can be used to
provide the Spring Integration AMQP framework
to the application:
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-amqp</artifactId>
<version>4.0.4.RELEASE</version>
</dependency>
45. Spring RabbitMQ
• The Spring Integration Framework provides:
– Inbound-channel-adapter for reading messages from
a queue
– outbound-channel-adapter for sending messages to
an exchange