Building a Reliable Messaging Infrastructure with Apache ActiveMQ



Similar documents
Next Generation Open Source Messaging with Apache Apollo

WELCOME TO Open Source Enterprise Architecture

The future of middleware: enterprise application integration and Fuse

Introduction to Enterprise Service Bus

RED HAT JBOSS FUSE. An open source enterprise service bus

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Introduction to WebSphere Process Server and WebSphere Enterprise Service Bus

RED HAT JBOSS FUSE COMPARED WITH ORACLE SERVICE BUS

RED HAT JBOSS A-MQ COMPARED WITH IBM WEBSPHERE MQ 7.5

Classic Grid Architecture

Enterprise Integration

Red Hat JBoss A-MQ Product Introduction. Version 6.0 April 2013

WSO2 Message Broker. Scalable persistent Messaging System

RED HAT JBOSS FUSE. A lightweight, flexible integration platform

WEBLOGIC ADMINISTRATION

A Survey Study on Monitoring Service for Grid

Building the European Biodiversity. Observation Network (EU BON)

AquaLogic ESB Design and Integration (3 Days)

JoramMQ, a distributed MQTT broker for the Internet of Things

How To Integrate With An Enterprise Service Bus (Esb)

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

BUILDING HIGH-AVAILABILITY SERVICES IN JAVA

No.1 IT Online training institute from Hyderabad URL: sriramtechnologies.com

Oracle Service Bus: - When to use, where to use and when not to use

WebLogic Server Admin

Future Internet Technologies

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Setting Up B2B Data Exchange for High Availability in an Active/Active Configuration

SERVICE ORIENTED ARCHITECTURE

Exam : Oracle 1Z : Oracle WebLogic Server 10gSystem Administration. Version : DEMO

How to secure your Apache Camel deployment

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

RED HAT JBOSS FUSE SERVICE WORKS 6 COMPARED WITH MULE ESB ENTERPRISE 3.4

MESSAGING SECURITY USING GLASSFISH AND OPEN MESSAGE QUEUE

ActiveVOS Server Architecture. March 2009

Red Hat JBoss Fuse Product Introduction. Version 6.0 April 2013

Programming Without a Call Stack: Event-driven Architectures

MuleSoft Blueprint: Load Balancing Mule for Scalability and Availability

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

Real World Integration Challenges and Enterprise Service Bus (ESB)

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

A Discovery service, which is a repository to store information about a service, including where it is located and how it should be called.

HDMQ :Towards In-Order and Exactly-Once Delivery using Hierarchical Distributed Message Queues. Dharmit Patel Faraj Khasib Shiva Srivastava

Enterprise Service Bus

WELCOME. Where and When should I use the Oracle Service Bus (OSB) Guido Schmutz. UKOUG Conference

WebSphere Application Server V8.5: Technical Overview Guide

Who are We Specialized. Recognized. Preferred. The right partner makes all the difference.

Load balancing in ESB based service platform

Oracle Exam 1z0-102 Oracle Weblogic Server 11g: System Administration I Version: 9.0 [ Total Questions: 111 ]

JBI and OpenESB. Introduction to Technology. Michael Czapski Advanced Solutions Architect, SOA/BI/Java CAPS Sun Microsystems, ANZ

SCA-based Enterprise Service Bus WebSphere ESB

WebLogic Server Foundation Topology, Configuration and Administration

Enterprise Application Integration (EAI) Architectures, Technologies, and Best Practices

Persistent, Reliable JMS Messaging Integrated Into Voyager s Distributed Application Platform

Increasing IT flexibility with IBM WebSphere ESB software.

XpoLog Competitive Comparison Sheet

Enterprise Service Bus Evaluation as Integration Platform for Ocean Observatories

Event-based middleware services

High Availability: Evaluating Open Source Enterprise Service Buses

Oracle WebLogic Server 11g: Administration Essentials

Short messaging solutions, including XMPP based instant messaging and text based conferences, between health care providers and general practitioners

Operations and Monitoring with Spring

Ikasan ESB Reference Architecture Review

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

Introduction to MQTT. May 15th /05/2013 1

Magnus Larsson Callista Enterprise AB

Message Oriented Middleware (MOM)

Service Mediation. The Role of an Enterprise Service Bus in an SOA

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

ATHABASCA UNIVERSITY. Enterprise Integration with Messaging

WHITE PAPER. Talend Enterprise ESB Technical Overview

An Oracle White Paper October BI Publisher 11g Scheduling & Apache ActiveMQ as JMS Provider

Listeners. Formats. Free Form. Formatted

This document summarizes the steps of deploying ActiveVOS on the IBM WebSphere Platform.

1Z Oracle Weblogic Server 11g: System Administration I. Version: Demo. Page <<1/7>>

A Unified Messaging-Based Architectural Pattern for Building Scalable Enterprise Service Bus

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH CERN ACCELERATORS AND TECHNOLOGY SECTOR A REMOTE TRACING FACILITY FOR DISTRIBUTED SYSTEMS

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

Bayeux Protocol: la nuova frontiera della comunicazione a portata di mano. Relatore Nino Guarnacci

ESB Versus ActiveVOS

Principles and Foundations of Web Services: An Holistic View (Technologies, Business Drivers, Models, Architectures and Standards)

Combining Service-Oriented Architecture and Event-Driven Architecture using an Enterprise Service Bus

Tomcat Tuning. Mark Thomas April 2009

Enterprise Service Bus: Five Keys for Taking a Ride

SCA & SDO Implementations Open Source and Vendor Products

What I Advise Every Customer To Do On Their Oracle SOA Projects

CA Process Automation

High Performance Messaging for Web-based Trading Systems. Frank Greco Director of Technology, Kaazing

Spoilt for Choice Which Integration Framework to choose? Mule ESB. Integration. Kai Wähner

Oracle WebLogic Server 11g Administration

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Enterprise Service Bus

The Service Revolution software engineering without programming languages

Building Scalable Messaging Systems with Qpid. Lessons Learned from PayPal

Transcription:

Building a Reliable Messaging Infrastructure with Apache ActiveMQ Bruce Snyder IONA Technologies Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 1

Do You JMS? Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 2

A Crash Course in Messaging Loosely coupled vs. tightly coupled - The loosely coupled exchange of messages - Producers and consumers are not aware of one another - Communication is indirect via destinations - Synchronous or asynchronous message delivery - Optional features -- Durability -- Persistence -- Transactionality - Understanding message domains is important Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 3

Point-to-Point Messaging Analogy: person-to-person email - One-to-one - One consumer per message - Based on queues - Once and only once delivery - Queues retain messages until consumed or expired - Good for load balancing messages - Queue browsing - Partial outages OK Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 4

Publish-Subscribe Messaging Domain Analogy: Mailing lists - Based on topics - Publishers and subscribers - Publisher had no knowledge of subscribers - Messages are delivered to all subscribers - Business events, i.e., EDA Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 5

First Principle of Messaging There is no absolute comparison to distinguish Message Oriented Middleware - All situations are unique in some way - Too many use cases Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 6

What Are Your Performance Objectives? - Will you use synchronous or asynchronous messaging? -- Is performance more critical than QOS? - Can your app handle duplicate messages? - Can your app handle missing messages? - Do you need messages to be received in order? - Do you have any slow consumer situations? - Do you know your message requirements? -- What is the average message size? -- How consistent is this size? -- How much can it vary? -- Are there attachments on the messages? -- Are the messages binary or text? -- Will your messages need compression? -- Do all messages need compression? Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 7

What Trade-Offs Can You Accept? - Trade-offs are a given -- Speed and reliability are mutually exclusive -- Each comes at a price Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 8

Common Trade-Offs Synchronous vs. Asynchronous Messaging - Synchronous vs. asychronous - Durability and persistence - Transactionality - Message consumption Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 9

Common Trade-Offs Durability vs. Persistence - Durability -- When subscriber goes offline messages are held - Persistence -- Messages held in a persistent data store Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 10

Common Trade-Offs Transactions -- Using them in batches can actually speed up some operations Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 11

Second Principle of Messaging Messaging is focused on reliability more than performance - Bottlenecks are in the speed bumps, not message destinations Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 12

Messaging Use Cases Are Still Expanding... - Integration -- Decoupling --- Level of indirection using messaging as the mediator - Enterprise Service Buses -- High amount of message variability -- Intelligent routing -- Itinerary-based routing -- Content-based routing -- Orchestration (e.g., BPEL) -- Workflow/BPM and BAM -- Complex Event Processing Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 13

What Is Apache ActiveMQ? Too many notes on this slide! - JMS 1.1 compliant - Integration with: -- Geronimo, Spring, Tomcat, JBoss and any J2EE 1.4 container (e.g., WebLogic or WebSphere) - Supported transports -- TCP, UDP, multicast, SSL, HTTP, Jabber (XMPP), JXTA, etc. - Pluggable persistence and security - Wildcards, selectors, composite destinations - Fast and highly scalable - Topologies supported: -- Clustering, peer-to-peer, federated network support - Multi-language clienets: -- Java, C/C++,.NET, Ruby, Perl, PHP, Python Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 14

Examples Demo Easily send and receive messages using the default examples Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 15

Configuration (conf/activemq.xml) Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 16

ActiveMQ Uses URIs <protocol>://<host>:<port>?<transport-options> Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 17

Example URIs vm://localhost?broker.persistent=false tcp://localhost:61616?jms.useasyncsend=true stomp://localhost:61613 failover:(tcp://host1:61616,tcp://host2:61616)? initialreconnectdelay=100 Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 18

ActiveMQ Transports Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 19

Two Types of Transports - Client to broker communication -- The <transportconnector> element - Broker to broker communication -- The <networkconnector> element Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 20

Message Persistence - High performance journal - JDBC provider - Kaha provider Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 21

STOMP Client Demo Demonstrate using ActiveMQ with the Ruby STOMP client library Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 22

A network of brokers provides many choices Federated network of brokers - Many brokers acting as a single, logical broker - Use network connectors between each other - Store and forward strategy - Brokers use static or discovery based routing - Clients can also use static or discovery based routing Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 23

Topology Example Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 24

Topology Example Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 25

Topology Example Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 26

Topology Example Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 27

Topology Example Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 28

Master/Slave Broker Configurations - Pure Master/Slave -- Shared nothing, fully replicated topology --- Does not depend on shared filesystem or database -- Slave broker consumes all message states from the Master broker (messages, acks, tx states) -- Slave does not start any networking or transport connectors -- Master broker will only respond to client when a message exchange has been successfully passed to the slave broker - Shared Filesystem -- Uses directory on shared filesystem (SAN) - JDBC Master/Slave -- Uses a shared database Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 29

Message Prefetch queue = new ActiveMQQueue("TEST.QUEUE? consumer.prefetchsize=10"); consumer = session.createconsumer(queue); Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 30

Asynch Dispatch queue = new ActiveMQQueue("FOO.QUEUE? consumer.dispatchasync=true"); consumer = session.createconsumer(queue); - Asynchronous message delivery - Configurable on ConnectionFactory, Connection and Consumer - Mostly used for slow consumers Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 31

Wildcards on Subscriptions Price.> Price.Stock.> Price.Stock.NASDAQ.* Price.Stock.*.IBM. separates names in a path * matches any name in the path > matches recursively downward in the path Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 32

Virtual Destinations - Logical destinations that map onto one or more physical destinations - Works around the issue of JMS durable subscribers -- Only one thread can be active per clientid and subscriber name -- This works around that by using queue semantics on topics -- http://activemq.apache.org/virtual-destinations.html Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 33

Exclusive Consumers queue = new ActiveMQQueue("TEST.QUEUE? consumer.exclusive=true"); consumer = session.createconsumer(queue); - Anytime more than one consumer consuming from a queue, message order is lost - This feature allows a single consumer to consume all messages on a queue to maintain message ordering Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 34

Message Groups - Uses the JMSXGroupID property to define which message group a message belongs - Provides: -- Guarantees ordered processing of related messages across a single queue -- Load balancing of message processing across multiple consumers -- HA/failover if consumer goes down Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 35

Total Ordering - Ensures that each consumer will see the same total order of messages on a topic -- This feature is *per broker* Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 36

Consumer Priority queue = new ActiveMQQueue("TEST.QUEUE? consumer.priority=10"); consumer = session.createconsumer(queue); - Just like it sounds -- Gives consumer priority for message delivery - Allows for the weighting of consumers to optimize network traversal for message delivery Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 37

Retroactive Consumer queue = new ActiveMQQueue("TEST.QUEUE? consumer.retroactive=true"); consumer = session.createconsumer(queue); - Normal JMS Consumer with a kicker - Message replay at start of a subscription -- At the start of every subscription, send any old messages that the consumer may have missed - Configurable via timed or fixed size recovery http://activemq.apache.org/retroactive-consumer.html Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 38

Mirrored Queues Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 39

Monitoring Brokers and Messages - jconsole - Hyperic - IONA Fuse HQ - ActiveMQ web console Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 40

Visualization Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 41

What is Apache Camel? - Lightweight implementation of EIP -- http://enterpriseintegrationpatterns.com/ Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 42

What is EIP? - The bible of integration patterns Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 43

Example Pattern: Content Based Router RouteBuilder builder = new RouteBuilder() { public void configure() { from("seda:a").choice().when(header ("foo").isequalto("bar")).to("seda:b").when(header("foo").isequalto ("cheese")).to("seda:c").otherwise().to ("seda:d"); } }; - The Java version of the Camel CBR Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 44

Example Pattern: Content Based Router <camelcontext id="buildsimpleroutewithchoice" xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="seda:a"/> <choice> <when> <predicate> <header name="foo"/> <isequalto value="bar"/> </predicate> <to uri="seda:b"/> </when> <when> <predicate> <header name="foo"/> <isequalto value="cheese"/> </predicate> <to uri="seda:c"/> </when> <otherwise><to uri="seda:d"/></otherwise> </choice> </route> </camelcontext> - The XML version of the CBR Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 45

Thank You for Attending Please fill out your surveys Bruce Synder Building a Reliable Messaging Infrastructure with Apache ActiveMQ Slide 46