Apache ActiveMQ Intro - may-2012
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Apache ActiveMQ Intro - may-2012






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Apache ActiveMQ Intro - may-2012 Presentation Transcript

  • 1. ActiveMQ introduction
  • 2. What is ActiveMQ? • Apache ActiveMQ ™ is the most popular and powerful open source messaging and Integration Patterns server. • Apache ActiveMQ is fast, supports many Cross Language Clients and Protocols, comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License [From apache activemq’s website]
  • 3. Enterprise Integration Patterns [We are not going to cover Camel in this talk] • ActiveMQ includes the Apache Camel (http://camel.apache.org/) framework as implementation of the book Enterprise Integration Patterns (http://www.enterpriseintegrationpatterns.com/toc.html) • Camel empowers you to define routing and mediation rules in a variety of domain-specific languages, including a Java-based Fluent API, Spring or Blueprint XML Configuration files, and a Scala DSL. • Camel has transports (http://camel.apache.org/transport.html) for many different kinds of protocols, messaging systems, etc. – Amazon, AMQP, CXF, EJB, File, Gmail, HDFS, Http, JDBC, Jetty, Lucene, MongoDB, Netty, POP3, Quartz, RMI, SSH, Websocket, XMPP, etc Java Camel DSL example: receiving a message from ActiveMQ and sending it to a file. from(“activemq:test.queue").to("file://test.txt"); Camel is a framework included in the ActiveMQ distribution; it is up to you using it or not.
  • 4. Cross Language Clients and Protocols You can use ActiveMQ from virtually any language, and of course from the TID techplan languages. Protocols: OpenWire, REST, Stomp, WS Notification, XMPP, AMQP, MQTT Languages: C++, Java, Python, JavaScript - Ajax or WebSockets, PHP, ActionScript 3, Ajax, C, C# and .Net, Delphi and Delphi/FreePascal, Erlang, Flash / ActionScript, Haskell, Perl, Pike, Ruby and Rails support via ActiveMessaging, Smalltalk, WebSockets
  • 5. JMS 1.1 Features • Point to point [queues]: inmemory, persistent, transactional… • Publish/subscribe [topics]: transient / durable (durable messages are non-persistent!!!) • MessageTypes: text, stream, map, object… pub prod cons subs1 subs2 subs3 order.insert order.insert order.* order.>
  • 6. Advanced features • Amq extensions to base JMS – Exclusive consumer: assure messages arrive in order, when multiple consumers. Only one actively consuming. Consumer priorities. – Message groups: ‘sticky load balancer’, during subscriber life or msg group closed. – Composite & virtual destinations: ‘broker-based-routing’ prod subs1 subs2 order.insert order.> Compositequeue.q Queue.b cons
  • 7. Deployment options Single JVM Embedded broker Peer to peer Client-server Integration with java code: • Initialize by code • Spring • Start as external process Failover & Fanout Transports
  • 8. Networks of brokers & HA Broker networks, messages not consumed locally are forwarded broker-to-broker and dispatched to remote clients. • Message can hop through multiple brokers before consumed. • Each message is owned by a single broker at any point in time. • Messages are load-balanced among interested consumers. High availability: sharing data among brokers in a Master/Slave configuration • Fully-replicated Master/Slave pairing • Shared file system (SAN) Master/Slave • Shared database Master/Slave
  • 9. Live examples • Simple queue • Simple topic • Web mgmt • Monitoring with JMX (jconsole)
  • 10. Some references • Apache ActiveMQ - http://activemq.apache.org/ • What is ActiveMQ? - http://www.javacodegeeks.com/2012/04/what-is-activemq.html • JMS Development Fundamentals using Apache ActiveMQ - http://www.javacodegeeks.com/2012/03/jms- development-fundamentals-using.html • ActiveMQ IS Ready For Prime Time - http://www.javacodegeeks.com/2012/03/activemq-is-ready-for-prime- time.html • STOMP Messaging Benchmarks: ActiveMQ vs Apollo vs HornetQ vs RabbitMQ - http://hiramchirino.com/blog/2011/12/stomp-messaging-benchmarks-activemq-vs-apollo-vs-hornetq-vs- rabbitmq/ • Maven plugin for Amq Performance - http://activemq.apache.org/activemq-performance-module-users- manual.html • Observations on ActiveMQs temp storage. - http://tmielke.blogspot.com.es/2011/02/observations-on-activemqs- temp-storage.html • How to Use Automatic Failover In an ActiveMQ Network of Brokers - http://bsnyderblog.blogspot.com.es/2010/01/how-to-use-automatic-failover-in.html • Using Apache Camel, ActiveMQ and Esper for Complex Event Processing - http://macstrac.blogspot.com.es/2008/02/using-apache-camel-activemq-and-esper.html • Apache Apollo 1.0 Released - http://davsclaus.blogspot.com.es/2012/02/apache-apollo-10-released.html • Apache Apollo 1.0 Released! - http://hiramchirino.com/blog/2012/02/apache-apollo-1-0-released/