SlideShare a Scribd company logo
Real World Messaging
With Apache ActiveMQ
    Bruce Snyder
    bsnyder@apache.org
    7 Nov 2008
    New Orleans, Louisiana
Do You Use JMS?




                  2
Agenda

• Common questions
• ActiveMQ features




                      3
What is ActiveMQ?

• Message-oriented middleware
• Apache project
  – http://activemq.apache.org/
• Apache licensed
• JMS 1.1 compliant
• Goal:
  – Standards-based, message-oriented application
    integration across many languages and platforms


                                             4
What kind of hardware is
needed for a throughput of
X number of messages per
         second?



                       5
What Are Your
Performance Objectives?




                     6
What Trade-Offs
Can You Accept?




                  7
Common Trade-Offs


•   Messaging Domain
•   Durability v. Persistence
•   Message acks v. transactions
•   Message consumption types




                                   8
Messaging Domains

• Do all consumers need a copy of the
  messages?
• What if consumers are disconnected?
• Can consumers deal with missing
  messages?
• Do you need request/reply messaging?



                                  9
Durability v. Persistence

• What quality of service do you need?

  – Durability - should messages be held while
    consumer is offline?


  – Persistence - used to preserve messages in
    the event of a JMS provider failure



                                          10
Message Acks v.
          Transactions
• When messages are received, the
  consumer must acknowledge the
  message
  – There is no unacknowledge!


• Transactions allow for:
  – Rollback for error handling
  – Batching for speed


                                    11
Synchronous Message
        Consumption
public class MyConsumer {
...

public void doCreateConsumer() {

    Destination destination =
      consumer.getSession().createQueue(quot;JOBS.quot; + job);

    MessageConsumer messageConsumer =
       consumer.getSession().createConsumer(destination);

    while ((message = consumer.receive(timeout)) != null) {
      processMessage(message);
    }
}

...
}




                                                              12
Asynchronous Message
    Consumption
public class MyConsumer {
...

public void doCreateConsumer() {

    Destination destination =
      consumer.getSession().createQueue(quot;JOBS.quot; + job);

    MessageConsumer messageConsumer =
       consumer.getSession().createConsumer(destination);

    messageConsumer.setMessageListener(new MyMessageListener(job));
}

...
}




                                                               13
How can the broker be
    clustered to improve
   scalability or guarantee
        availability?
• Let’s talk about two features
  – Network of brokers
  – Master/slave




                                  14
Broker Options

•   Connectors
•   Persistence
•   Master/slave
•   Security




                            15
Two Types of Transports




                     16
Transport Connectors

• Client-to-broker connections
  – Similar to JDBC connections to a database
• Various protocols are supported:
  – VM
  – TCP
  – NIO
  – UDP
  – SSL
  – HTTP/S
                                          17
Clients Should Be
    Configured For Failover
• Use the failover protocol:

failover:(tcp://broker1:61616,tcp://broker2:61616, 
tcp://broker3:61616)?initialReconnectDelay=100




                                                   18
Network of Brokers

• Broker-to-broker connections
• Various protocols supported:
  – Static
  – Failover
  – Multicast
  – Zeroconf
  – Peer
  – Fanout
  – Discovery
                                 19
Networks of Brokers

• Provides large scalability
• ActiveMQ store-and-forward allows
  messages to traverse brokers
  – Demand-based forwarding
  – Some people call this distributed queues
• Many possible configurations or
  topologies are supported


                                           20
Topology Example




                   21
Topology Example




                   22
Topology Example




                   23
Topology Example




                   24
Topology Example




                   25
Master/Slave
Broker Configurations




                    26
Three Types of
          Master/Slave
• Pure master/slave
• Shared filesystem master/slave
• JDBC master/slave




                                   27
Pure Master/Slave

• Shared nothing, fully replicated topology
  – Does not depend on shared filesystem or
    database
• A Slave broker consumes all message
  states from the Master broker
  (messages, acks, tx states)
• Slave does not start any networking or
  transport connectors

                                         28
Pure Master/Slave

• Master broker will only respond to client
  when a message exchange has been
  successfully passed to the slave broker




                                        29
Pure Master/Slave

• If the master fails, the slave optionally
  has two modes of operation:
  – Start up all it’s network and transport
    connectors
     • All clients connected to failed Master resume
       on Slave
  – Close down completely
     • Slave is simply used to duplicate state from
       Master


                                                30
Shared Filesystem
         Master/Slave
• Utilizes a directory on a shared
  filesystem
• No restriction on number of brokers
• Simple configuration (point to the data
  dir)
• One master selected at random



                                     31
JDBC Master/Slave

• Recommended when using a shared
  database
• No restriction on the number of brokers
• Simple configuration
• Clustered database negates single
  point of failure
• One master selected at random


                                    32
Client Connectivity
       With Master/Slave
• Clients should use failover transport:

     failover://(tcp://masterhost:61616, 
       tcp://slavehost:61616)?randomize=false




                                                33
How can the broker be
    clustered to improve
   scalability or guarantee
        availability?
• Create a network of brokers
• Use master/slave for broker failover




                                     34
High Availability and
         Fault Tolerance
•   RAIDed disks
•   A Storage Area Network
•   Clustered relational databases
•   Clustered JDBC via C-JDBC
    – http://c-jdbc.objectweb.org/




                                     35
What's the real difference
   between message
 persistence strategies?




                       36
AMQ Message Store

• Transactional message storage solution
• Fast and reliable
• Composed of two parts:
  – Data Store - holds messages in a transactional
    journal
  – Reference store - stores message locations for
    fast retrieval
• The default message store in ActiveMQ 5

                                           37
Non-Journaled JDBC

• Transactional message storage solution
• Reliable but not fast
  – JDBC connection overhead is prohibitively
    slow




                                          38
Journaled JDBC

• Transactional message storage solution
• Reliable and faster than non-journaled
• Two-piece store
  – Journal - A high-performance, transactional
    journal
  – Database - A relational database of your
    choice
• Default database in ActiveMQ 4.x is
  Apache Derby
                                            39
Message Cursors

• Messages are no longer stored in
  memory
  – Previous to 5.1, message references were
    stored in memory
• Messages are paged in from storage
  when space is available in memory




                                         40
What security options are
        available?


• Authentication
  – I.e., are you allowed to connect to ActiveMQ?
• Authorization
  – I.e., do you have permission to use that
    ActiveMQ resource?


                                               41
Authentication

• File based
• JAAS based




                         42
Authorization

• Destination level
• Message level via custom plugin




                                    43
What's the best way to
 connect non-Java clients?


• Let’s talk about wire formats




                                  44
Wire Formats

• OpenWire
  – The default in ActiveMQ; a binary protocol
• STOMP
  – Simple Text Oriented Messaging Protocol; a text based protocol
• XMPP
   – The Jabber XML protocol
• REST
  – HTTP POST and GET
• AMQP
  – Not yet fully supported


                                                          45
OpenWire

• A binary wire level protocol for
  marshaling objects to/from byte arrays
• Designed for performance
  – Sacrificed some ease of implementation
• Clients for C++, Java and .NET
  – The default is Java




                                             46
STOMP

• A text-based wire level protocol
• Designed to be very easy to understand
  – Encourages implementation in additional
    languages
• Can be easily demonstrated via telnet
• Clients for C, Javascript, Perl, PHP,
  Python, Ruby and more


                                          47
What's the best approach if
 a producer or consumer
     may be down for
        some time?




                       48
Use the failover Protocol
• Utilize the failover options
   – initialReconnectDelay - wait before reconnect
   – maxReconnectDelay - max time between reconnects
   – useExponentialBackOff - exponentially grow time between
     reconnects
   – backOffMultiplier - multiplier for backoff
   – maxReconnectAttempts - max number of reconnects
   – randomize - randomly choose from list of brokers
   – backup - start and hold a hot standby connection




                                                     49
Use Producer Flow Control

• Prevents slow consumers from being
  flooded

        ...
        <destinationPolicy>
          <policyMap>
            <policyEntries>
              <policyEntry topic=quot;FOO.>quot;
                    producerFlowControl=quot;falsequot;
                    memoryLimit=quot;128mbquot;>
            </policyEntries>
          </policyMap>
        </destinationPolicy>
        ...



                                                  50
Use Message Persistence

• Quality of service to preserve messages
  in the event of broker failure




                                    51
Consumer Options

• Message prefetch
•   Consumer dispatch async
•   Exclusive consumer
•   Consumer priority
•   Message groups
•   Redeliery policies
•   Retroactive consumer
•   Selectors
•   Some slow consumer strategies

                                    52
Message Prefetch

• Used for slow consumer situations
  – Consumer is flooded by messages from the broker
• FIFO buffer on the consumer side




                                               53
Async Dispatch

• Asynchronous message delivery to
  consumers
  – Default is true
• Useful for slow consumers
  – Incurs a bit of overhead




                                     54
Exclusive Consumers

• Anytime more than one consumer is consuming
  from a queue, message order is lost
• Allows a single consumer to consume all
  messages on a queue to maintain message
  ordering




                                        55
Consumer Priority

• Just like it sounds
  – Gives a consumer priority for message delivery
  – Allows for the weighting of consumers to optimize
    network traversal for message delivery




                                              56
Message Groups

• Uses the JMSXGroupID property to define which
  message group a message belongs
  – Guarantees ordered processing of related messages across a
    single destination
  – Load balancing of message processing across multiple
    consumers
  – HA/failover if consumer goes down




                                                        57
Redelivery Policy

• Messages are redelivered to a client
  when:
  – A transacted session is rolled back
  – A transacted session is closed before commit
  – A session is using CLIENT_ACKNOWLEDGE
    and Session.recover() is explicitly called




                                          58
Retroactive Consumer

• 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 policies




                                               59
Wildcards on Destinations

• Price.>
• Price.Stock.>
• Price.Stock.NASDAQ.*
• Price.Stock.*.IBM

            ...
            <destinationPolicy>
              <policyMap>
                <policyEntries>
                  <policyEntry topic=quot;Price.Stock.>quot;
                        memoryLimit=quot;128mbquot;>
                </policyEntries>
              </policyMap>
            </destinationPolicy>
            ...
                                                       60
Selectors

• Used to attach a filter to a subscription
• Defined using a subset SQL 92 syntax
• JMS selectors
   – Filters only message properties
      • JMSType = ‘stock’ and trader = ‘bob’ and price < ‘105’
• XPath selectors
   – Filters message bodies that contain XML
      • ‘/message/cheese/text() = 'swiss'’




                                                            61
Slow Consumers
   Strategies




                 62
Slow Consumer Strategies

• Various configurable strategies for handling
  slow consumers
• Slow consumer situations are very common
• Caused by:
  –   Slow network connections
  –   Unreliable network connections
  –   Busy network situations
  –   Busy JVM situations
  –   Half disconnects with sockets

                                         63
Use Message Limit
           Strategies
• PendingMessageLimitStrategy
  – Calculates the max number of pending messages
    to be held in memory for a consumer above its
    prefetch size
• ConstantPendingMessageLimitStrategy
  – A constant limit for all consumers
• PrefetchRatePendingMessageLimitStrategy
  – Calculates the max number of pending messages
    using a multiplier of the consumers prefetch size


                                              64
Use Prefetch and
         an Eviction Policy
• Use the prefetch policy
  – The prefetch policy has a property named
    maximumPendingMessageLimit that can be used on
    a per connection or per consumer basis
• Use a message eviction policy
  – oldestMessageEvictionStrategy - Evict the oldest
    messages first
  – oldestMessageWithLowestPriorityEvictionStrategy -
    Evict the oldest messages with the lowest priority first



                                                     65
Use Destination Policies

• Configured on the destination policies in
  the ActiveMQ XML configuration file
• Combined with wildcards, this is very
  powerful




                                        66
Additional Tips

• Consider configuring message cursors
• The status of slow consumers can be monitored via
  JMX properties
  – discarded - The count of how many messages have been
    discarded during the lifetime of the subscription due to it being a
    slow consumer
  – matched - The current number of messages matched and to be
    dispatched to the subscription as soon as some capacity is
    available in the prefetch buffer. So a non-zero value implies that
    the prefetch buffer is full for this subscription




                                                              67
How to monitor individual
 messages, queue depths,
 or other broker statistics?

• JMX
• ActiveMQ web console
• Additional consumers
   – Camel routes
• SpringSource AMS
   – Based on Hyperic
• IONA FuseHQ
                         68
   – Based on Hyperic
What is Apache Camel?




 http://activemq.apache.org/camel/
Camel Components
Fluent Java API

RouteBuilder MyRoute = new RouteBuilder() {
   public void configure() {
     from(quot;activemq:TEST.QUEUEquot;).
          to(quot;file:///Users/bsnyder/camelinbox/text.txtquot;).
          to(quot;log:MyLogquot;);
   }
};
XML Config

<camelContext id=quot;camelquot;
  xmlns=quot;http://activemq.apache.org/camel/schema/springquot;>
  <package>com.mycompany</package>
  <route>
    <from uri=quot;activemq:example.Aquot; />
    <to uri=quot;file:///Users/bsnyder/camelinbox/text.txtquot; />
    <to uri=”log:MyLog?showProperties=true” />
  </route>
</camelContext>
Information Overload Yet?
Thank You For Attending!




 Questions?

More Related Content

What's hot

Actor Model & Reactive Manifesto
Actor Model & Reactive ManifestoActor Model & Reactive Manifesto
Actor Model & Reactive Manifesto
Angelo Simone Scotto
 
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
Amazon Web Services Korea
 
Aws EC2 ENI, ENA, EFA
Aws EC2 ENI, ENA, EFAAws EC2 ENI, ENA, EFA
Aws EC2 ENI, ENA, EFA
Aléx Carvalho
 
Ozone: An Object Store in HDFS
Ozone: An Object Store in HDFSOzone: An Object Store in HDFS
Ozone: An Object Store in HDFS
DataWorks Summit
 
Storage Requirements and Options for Running Spark on Kubernetes
Storage Requirements and Options for Running Spark on KubernetesStorage Requirements and Options for Running Spark on Kubernetes
Storage Requirements and Options for Running Spark on Kubernetes
DataWorks Summit
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
Saroj Panyasrivanit
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
Sam Brannen
 
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS SummitAmazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
Amazon Web Services
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
Rob Davies
 
Apache web server
Apache web serverApache web server
Apache web server
Sabiha M
 
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개 [Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
CJ Olivenetworks
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon Web Services Korea
 
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Day
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per DayDv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Day
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Daywebtel125
 
DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)
WhaTap Labs
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
Amazon Web Services
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
Gavin Roy
 
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
AWSKRUG - AWS한국사용자모임
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
Rishikese MR
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
DataWorks Summit
 
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Vietnam Open Infrastructure User Group
 

What's hot (20)

Actor Model & Reactive Manifesto
Actor Model & Reactive ManifestoActor Model & Reactive Manifesto
Actor Model & Reactive Manifesto
 
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
20분안에 스타트업이 알아야하는 AWS의 모든것 - 윤석찬 :: 스타트업얼라이언스 런치클럽
 
Aws EC2 ENI, ENA, EFA
Aws EC2 ENI, ENA, EFAAws EC2 ENI, ENA, EFA
Aws EC2 ENI, ENA, EFA
 
Ozone: An Object Store in HDFS
Ozone: An Object Store in HDFSOzone: An Object Store in HDFS
Ozone: An Object Store in HDFS
 
Storage Requirements and Options for Running Spark on Kubernetes
Storage Requirements and Options for Running Spark on KubernetesStorage Requirements and Options for Running Spark on Kubernetes
Storage Requirements and Options for Running Spark on Kubernetes
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
 
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS SummitAmazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
Amazon Aurora: Deep Dive - SRV308 - Chicago AWS Summit
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
 
Apache web server
Apache web serverApache web server
Apache web server
 
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개 [Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
[Gridgain]인메모리컴퓨팅 및 국내레퍼런스 소개
 
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
 
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Day
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per DayDv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Day
Dv Pmysqluc Federation At Flickr Doing Billions Of Queries Per Day
 
DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)DB Monitoring 개념 및 활용 (박명규)
DB Monitoring 개념 및 활용 (박명규)
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
EKS에서 Opentelemetry로 코드실행 모니터링하기 - 신재현 (인덴트코퍼레이션) :: AWS Community Day Online...
 
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.OVERVIEW  OF FACEBOOK SCALABLE ARCHITECTURE.
OVERVIEW OF FACEBOOK SCALABLE ARCHITECTURE.
 
Floating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache RatisFloating on a RAFT: HBase Durability with Apache Ratis
Floating on a RAFT: HBase Durability with Apache Ratis
 
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
 

Similar to Messaging With ActiveMQ

Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSBruce Snyder
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQBruce Snyder
 
AP4R on RubyKaigi2007 (English only)
AP4R on RubyKaigi2007 (English only)AP4R on RubyKaigi2007 (English only)
AP4R on RubyKaigi2007 (English only)
Kato Kiwamu
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE
 
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilitySolving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
ZendCon
 
Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)Yury Kaliaha
 
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
ChemAxon
 
Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018
Otávio Carvalho
 
AP4R on RubyConf2007
AP4R on RubyConf2007AP4R on RubyConf2007
AP4R on RubyConf2007
Kato Kiwamu
 
Open Source Integration with WSO2 Enterprise Service Bus
Open Source Integration  with  WSO2 Enterprise Service BusOpen Source Integration  with  WSO2 Enterprise Service Bus
Open Source Integration with WSO2 Enterprise Service Bus
sumedha.r
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mq
Rob Davies
 
Xen_and_Rails_deployment
Xen_and_Rails_deploymentXen_and_Rails_deployment
Xen_and_Rails_deploymentAbhishek Singh
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
Federico Michele Facca
 
Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
PT.JUG
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
Ryan Cuprak
 
Deploying flash storage for Ceph without compromising performance
Deploying flash storage for Ceph without compromising performance Deploying flash storage for Ceph without compromising performance
Deploying flash storage for Ceph without compromising performance
Ceph Community
 
Scalarea Aplicatiilor Web - 2009
Scalarea Aplicatiilor Web - 2009Scalarea Aplicatiilor Web - 2009
Scalarea Aplicatiilor Web - 2009Andrei Gheorghe
 
Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2
Jim Jagielski
 
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6
 

Similar to Messaging With ActiveMQ (20)

Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
 
AP4R on RubyKaigi2007 (English only)
AP4R on RubyKaigi2007 (English only)AP4R on RubyKaigi2007 (English only)
AP4R on RubyKaigi2007 (English only)
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and ScalabilitySolving the C20K problem: Raising the bar in PHP Performance and Scalability
Solving the C20K problem: Raising the bar in PHP Performance and Scalability
 
Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)
 
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
Instant J Chem: one-stop information hub for medicinal chemists: US UGM 2008
 
Open Mq Intro
Open Mq IntroOpen Mq Intro
Open Mq Intro
 
Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018
 
AP4R on RubyConf2007
AP4R on RubyConf2007AP4R on RubyConf2007
AP4R on RubyConf2007
 
Open Source Integration with WSO2 Enterprise Service Bus
Open Source Integration  with  WSO2 Enterprise Service BusOpen Source Integration  with  WSO2 Enterprise Service Bus
Open Source Integration with WSO2 Enterprise Service Bus
 
Connecting applicationswitha mq
Connecting applicationswitha mqConnecting applicationswitha mq
Connecting applicationswitha mq
 
Xen_and_Rails_deployment
Xen_and_Rails_deploymentXen_and_Rails_deployment
Xen_and_Rails_deployment
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Deploying flash storage for Ceph without compromising performance
Deploying flash storage for Ceph without compromising performance Deploying flash storage for Ceph without compromising performance
Deploying flash storage for Ceph without compromising performance
 
Scalarea Aplicatiilor Web - 2009
Scalarea Aplicatiilor Web - 2009Scalarea Aplicatiilor Web - 2009
Scalarea Aplicatiilor Web - 2009
 
Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2Acus08 Advanced Load Balancing Apache2.2
Acus08 Advanced Load Balancing Apache2.2
 
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...Gear6 and Scaling Website Performance:  Caching Session and Profile Data with...
Gear6 and Scaling Website Performance: Caching Session and Profile Data with...
 

More from Bruce Snyder

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBruce Snyder
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSBruce Snyder
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringBruce Snyder
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011Bruce Snyder
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyBruce Snyder
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixBruce Snyder
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a RideBruce Snyder
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
Bruce Snyder
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
Bruce Snyder
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
Bruce Snyder
 

More from Bruce Snyder (12)

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMS
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using Spring
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011
 
Using Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel JockeyUsing Enterprise Integration Patterns as Your Camel Jockey
Using Enterprise Integration Patterns as Your Camel Jockey
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMix
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
EIP In Practice
EIP In PracticeEIP In Practice
EIP In Practice
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

Messaging With ActiveMQ

  • 1. Real World Messaging With Apache ActiveMQ Bruce Snyder bsnyder@apache.org 7 Nov 2008 New Orleans, Louisiana
  • 2. Do You Use JMS? 2
  • 3. Agenda • Common questions • ActiveMQ features 3
  • 4. What is ActiveMQ? • Message-oriented middleware • Apache project – http://activemq.apache.org/ • Apache licensed • JMS 1.1 compliant • Goal: – Standards-based, message-oriented application integration across many languages and platforms 4
  • 5. What kind of hardware is needed for a throughput of X number of messages per second? 5
  • 8. Common Trade-Offs • Messaging Domain • Durability v. Persistence • Message acks v. transactions • Message consumption types 8
  • 9. Messaging Domains • Do all consumers need a copy of the messages? • What if consumers are disconnected? • Can consumers deal with missing messages? • Do you need request/reply messaging? 9
  • 10. Durability v. Persistence • What quality of service do you need? – Durability - should messages be held while consumer is offline? – Persistence - used to preserve messages in the event of a JMS provider failure 10
  • 11. Message Acks v. Transactions • When messages are received, the consumer must acknowledge the message – There is no unacknowledge! • Transactions allow for: – Rollback for error handling – Batching for speed 11
  • 12. Synchronous Message Consumption public class MyConsumer { ... public void doCreateConsumer() { Destination destination = consumer.getSession().createQueue(quot;JOBS.quot; + job); MessageConsumer messageConsumer = consumer.getSession().createConsumer(destination); while ((message = consumer.receive(timeout)) != null) { processMessage(message); } } ... } 12
  • 13. Asynchronous Message Consumption public class MyConsumer { ... public void doCreateConsumer() { Destination destination = consumer.getSession().createQueue(quot;JOBS.quot; + job); MessageConsumer messageConsumer = consumer.getSession().createConsumer(destination); messageConsumer.setMessageListener(new MyMessageListener(job)); } ... } 13
  • 14. How can the broker be clustered to improve scalability or guarantee availability? • Let’s talk about two features – Network of brokers – Master/slave 14
  • 15. Broker Options • Connectors • Persistence • Master/slave • Security 15
  • 16. Two Types of Transports 16
  • 17. Transport Connectors • Client-to-broker connections – Similar to JDBC connections to a database • Various protocols are supported: – VM – TCP – NIO – UDP – SSL – HTTP/S 17
  • 18. Clients Should Be Configured For Failover • Use the failover protocol: failover:(tcp://broker1:61616,tcp://broker2:61616, tcp://broker3:61616)?initialReconnectDelay=100 18
  • 19. Network of Brokers • Broker-to-broker connections • Various protocols supported: – Static – Failover – Multicast – Zeroconf – Peer – Fanout – Discovery 19
  • 20. Networks of Brokers • Provides large scalability • ActiveMQ store-and-forward allows messages to traverse brokers – Demand-based forwarding – Some people call this distributed queues • Many possible configurations or topologies are supported 20
  • 27. Three Types of Master/Slave • Pure master/slave • Shared filesystem master/slave • JDBC master/slave 27
  • 28. Pure Master/Slave • Shared nothing, fully replicated topology – Does not depend on shared filesystem or database • A Slave broker consumes all message states from the Master broker (messages, acks, tx states) • Slave does not start any networking or transport connectors 28
  • 29. Pure Master/Slave • Master broker will only respond to client when a message exchange has been successfully passed to the slave broker 29
  • 30. Pure Master/Slave • If the master fails, the slave optionally has two modes of operation: – Start up all it’s network and transport connectors • All clients connected to failed Master resume on Slave – Close down completely • Slave is simply used to duplicate state from Master 30
  • 31. Shared Filesystem Master/Slave • Utilizes a directory on a shared filesystem • No restriction on number of brokers • Simple configuration (point to the data dir) • One master selected at random 31
  • 32. JDBC Master/Slave • Recommended when using a shared database • No restriction on the number of brokers • Simple configuration • Clustered database negates single point of failure • One master selected at random 32
  • 33. Client Connectivity With Master/Slave • Clients should use failover transport: failover://(tcp://masterhost:61616, tcp://slavehost:61616)?randomize=false 33
  • 34. How can the broker be clustered to improve scalability or guarantee availability? • Create a network of brokers • Use master/slave for broker failover 34
  • 35. High Availability and Fault Tolerance • RAIDed disks • A Storage Area Network • Clustered relational databases • Clustered JDBC via C-JDBC – http://c-jdbc.objectweb.org/ 35
  • 36. What's the real difference between message persistence strategies? 36
  • 37. AMQ Message Store • Transactional message storage solution • Fast and reliable • Composed of two parts: – Data Store - holds messages in a transactional journal – Reference store - stores message locations for fast retrieval • The default message store in ActiveMQ 5 37
  • 38. Non-Journaled JDBC • Transactional message storage solution • Reliable but not fast – JDBC connection overhead is prohibitively slow 38
  • 39. Journaled JDBC • Transactional message storage solution • Reliable and faster than non-journaled • Two-piece store – Journal - A high-performance, transactional journal – Database - A relational database of your choice • Default database in ActiveMQ 4.x is Apache Derby 39
  • 40. Message Cursors • Messages are no longer stored in memory – Previous to 5.1, message references were stored in memory • Messages are paged in from storage when space is available in memory 40
  • 41. What security options are available? • Authentication – I.e., are you allowed to connect to ActiveMQ? • Authorization – I.e., do you have permission to use that ActiveMQ resource? 41
  • 43. Authorization • Destination level • Message level via custom plugin 43
  • 44. What's the best way to connect non-Java clients? • Let’s talk about wire formats 44
  • 45. Wire Formats • OpenWire – The default in ActiveMQ; a binary protocol • STOMP – Simple Text Oriented Messaging Protocol; a text based protocol • XMPP – The Jabber XML protocol • REST – HTTP POST and GET • AMQP – Not yet fully supported 45
  • 46. OpenWire • A binary wire level protocol for marshaling objects to/from byte arrays • Designed for performance – Sacrificed some ease of implementation • Clients for C++, Java and .NET – The default is Java 46
  • 47. STOMP • A text-based wire level protocol • Designed to be very easy to understand – Encourages implementation in additional languages • Can be easily demonstrated via telnet • Clients for C, Javascript, Perl, PHP, Python, Ruby and more 47
  • 48. What's the best approach if a producer or consumer may be down for some time? 48
  • 49. Use the failover Protocol • Utilize the failover options – initialReconnectDelay - wait before reconnect – maxReconnectDelay - max time between reconnects – useExponentialBackOff - exponentially grow time between reconnects – backOffMultiplier - multiplier for backoff – maxReconnectAttempts - max number of reconnects – randomize - randomly choose from list of brokers – backup - start and hold a hot standby connection 49
  • 50. Use Producer Flow Control • Prevents slow consumers from being flooded ... <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=quot;FOO.>quot; producerFlowControl=quot;falsequot; memoryLimit=quot;128mbquot;> </policyEntries> </policyMap> </destinationPolicy> ... 50
  • 51. Use Message Persistence • Quality of service to preserve messages in the event of broker failure 51
  • 52. Consumer Options • Message prefetch • Consumer dispatch async • Exclusive consumer • Consumer priority • Message groups • Redeliery policies • Retroactive consumer • Selectors • Some slow consumer strategies 52
  • 53. Message Prefetch • Used for slow consumer situations – Consumer is flooded by messages from the broker • FIFO buffer on the consumer side 53
  • 54. Async Dispatch • Asynchronous message delivery to consumers – Default is true • Useful for slow consumers – Incurs a bit of overhead 54
  • 55. Exclusive Consumers • Anytime more than one consumer is consuming from a queue, message order is lost • Allows a single consumer to consume all messages on a queue to maintain message ordering 55
  • 56. Consumer Priority • Just like it sounds – Gives a consumer priority for message delivery – Allows for the weighting of consumers to optimize network traversal for message delivery 56
  • 57. Message Groups • Uses the JMSXGroupID property to define which message group a message belongs – Guarantees ordered processing of related messages across a single destination – Load balancing of message processing across multiple consumers – HA/failover if consumer goes down 57
  • 58. Redelivery Policy • Messages are redelivered to a client when: – A transacted session is rolled back – A transacted session is closed before commit – A session is using CLIENT_ACKNOWLEDGE and Session.recover() is explicitly called 58
  • 59. Retroactive Consumer • 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 policies 59
  • 60. Wildcards on Destinations • Price.> • Price.Stock.> • Price.Stock.NASDAQ.* • Price.Stock.*.IBM ... <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=quot;Price.Stock.>quot; memoryLimit=quot;128mbquot;> </policyEntries> </policyMap> </destinationPolicy> ... 60
  • 61. Selectors • Used to attach a filter to a subscription • Defined using a subset SQL 92 syntax • JMS selectors – Filters only message properties • JMSType = ‘stock’ and trader = ‘bob’ and price < ‘105’ • XPath selectors – Filters message bodies that contain XML • ‘/message/cheese/text() = 'swiss'’ 61
  • 62. Slow Consumers Strategies 62
  • 63. Slow Consumer Strategies • Various configurable strategies for handling slow consumers • Slow consumer situations are very common • Caused by: – Slow network connections – Unreliable network connections – Busy network situations – Busy JVM situations – Half disconnects with sockets 63
  • 64. Use Message Limit Strategies • PendingMessageLimitStrategy – Calculates the max number of pending messages to be held in memory for a consumer above its prefetch size • ConstantPendingMessageLimitStrategy – A constant limit for all consumers • PrefetchRatePendingMessageLimitStrategy – Calculates the max number of pending messages using a multiplier of the consumers prefetch size 64
  • 65. Use Prefetch and an Eviction Policy • Use the prefetch policy – The prefetch policy has a property named maximumPendingMessageLimit that can be used on a per connection or per consumer basis • Use a message eviction policy – oldestMessageEvictionStrategy - Evict the oldest messages first – oldestMessageWithLowestPriorityEvictionStrategy - Evict the oldest messages with the lowest priority first 65
  • 66. Use Destination Policies • Configured on the destination policies in the ActiveMQ XML configuration file • Combined with wildcards, this is very powerful 66
  • 67. Additional Tips • Consider configuring message cursors • The status of slow consumers can be monitored via JMX properties – discarded - The count of how many messages have been discarded during the lifetime of the subscription due to it being a slow consumer – matched - The current number of messages matched and to be dispatched to the subscription as soon as some capacity is available in the prefetch buffer. So a non-zero value implies that the prefetch buffer is full for this subscription 67
  • 68. How to monitor individual messages, queue depths, or other broker statistics? • JMX • ActiveMQ web console • Additional consumers – Camel routes • SpringSource AMS – Based on Hyperic • IONA FuseHQ 68 – Based on Hyperic
  • 69. What is Apache Camel? http://activemq.apache.org/camel/
  • 70.
  • 72. Fluent Java API RouteBuilder MyRoute = new RouteBuilder() { public void configure() { from(quot;activemq:TEST.QUEUEquot;). to(quot;file:///Users/bsnyder/camelinbox/text.txtquot;). to(quot;log:MyLogquot;); } };
  • 73. XML Config <camelContext id=quot;camelquot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <package>com.mycompany</package> <route> <from uri=quot;activemq:example.Aquot; /> <to uri=quot;file:///Users/bsnyder/camelinbox/text.txtquot; /> <to uri=”log:MyLog?showProperties=true” /> </route> </camelContext>
  • 75. Thank You For Attending! Questions?