SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
Faster & Greater Messaging System
            HornetQ zzz
                           Giovanni Marigi
                      gmarigi at redhat.com
                           Middleware Consultant
                      JBoss, a Division of Red Hat
Agenda

o   Intro
o   Core
o   EAP and standalone
o   Transport
o   Persistence & large messages
o   Flow control
o   Clustering & High Availability
o   Other features
Some stats
HornetQ sets a record breaking score in the SPECjms2007 industry
standard benchmark for JMS messaging system performance.

HornetQ 2.0.GA obtained scores up to 307% higher than previously
published
SPECjms2007 benchmark results, on the same server hardware
and operating system set-up.
The peer-reviewed results are available on the spec.org web-site:
www.spec.org/jms2007/results/jms2007.html

8.2 messages per second with SpecJMS
http://planet.jboss.org/post/8_2_million_messages_second_with_specjms

The results were obtained by Kai Sachs and Stefan Appel from an
independent research group at the TU Darmstadt, Germany.

Their release announcement can be found here:
www.dvs.tu-darmstadt.de/news/specjms2007Results_HornetQ.html
HornetQ core

HornetQ core is designed simply as a set of POJOs.

It has also been designed to have as few dependencies on external
jars as possible.
As a result HornetQ core has only one more jar dependency than
the standard JDK classes; netty.jar
netty buffer classes are used internally.

Each HornetQ server has its own ultra high performance persistent
journal, which it uses for messaging and other persistence.

Using a high performance journal allows persistence message
performance, which is something not achievable when using a
relational database for persistence.
HornetQ modes

HornetQ currently provides two APIs for messaging at the client
side:
Core client API
simple intuitive Java API that allows the full set of
messaging functionality without some of the complexities of JMS.

JMS client API
standard JMS API
JMS semantics are implemented by a thin JMS facade layer on the
client side.

The HornetQ server does not associate with JMS and does not
know anything about JMS. It is a protocol agnostic messaging
server designed to be used with multiple different protocols.
When a user uses the JMS API on the client side, all JMS
interactions are translated into operations on the HornetQ core client
API before being transferred over the wire using the HornetQ wire
format.
HornetQ modes
HornetQ in EAP

JBoss EAP 5.1.x
- not the default messaging system
- easy to switch from JBM to HornetQ
- JBM or HornetQ not together!

JBoss EAP 6.x
- default JMS implementation

HornetQ configuration in JBoss EAP 5.1.x
jboss/$profile/deploy/hornetq
- hornetq-configuration.xml
- hornetq-jms.xml

HornetQ configuration in JBoss EAP 6.x
jboss/standalone/configuration
- standalone-*.xml
jboss/domain/configuration
- domain.xml
HornetQ in EAP 6
<security-settings>
      <security-setting match="#">
         <permission type="send" roles="guest"/>
         <permission type="consume" roles="guest"/>                             security
         <permission type="createNonDurableQueue" roles="guest"/>
         <permission type="deleteNonDurableQueue" roles="guest"/>
      </security-setting>
 </security-settings>
 <address-settings>
     <address-setting match="#">
         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
         <redelivery-delay>0</redelivery-delay>
        <max-size-bytes>10485760</max-size-bytes>                               addressing
         <address-full-policy>BLOCK</address-full-policy>
         <message-counter-history-day-limit>10</message-counter-history-day-limit>
      </address-setting>
</address-settings>
HornetQ in EAP 6
<jms-connection-factories>
     <connection-factory name="InVmConnectionFactory">
         <connectors>
                <connector-ref connector-name="in-vm"/>
              </connectors>                                         connection factories
              <entries>
                <entry name="java:/ConnectionFactory"/>
              </entries>
            </connection-factory>
            <connection-factory name="RemoteConnectionFactory">
              <connectors>
                <connector-ref connector-name="netty"/>
              </connectors>
              <entries>
                <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
              </entries>
            </connection-factory>
HornetQ in EAP 6
<pooled-connection-factory name="hornetq-ra">
        <transaction mode="xa"/>
              <connectors>
                <connector-ref connector-name="in-vm"/>
              </connectors>
              <entries>
                <entry name="java:/JmsXA"/>
              </entries>
           </pooled-connection-factory>
         </jms-connection-factories>                          jms destinations
         <jms-destinations>
                 <jms-queue name="notificationQueue">
                   <entry name="/queue/notificationQueue"/>
           </jms-queue>
         </jms-destinations>
       </hornetq-server>
HornetQ in EAP 6
public void sendToQueue(String destinationName,Serializable payload) throws Exception {
     InitialContext ic = new InitialContext();
     ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
     Queue queue = (Queue)ic.lookup(destinationName);
     Connection connection = cf.createConnection();
     Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
     MessageProducer publisher = session.createProducer(queue);
     connection.start();
                                                                                          jms producer
     ObjectMessage message = session.createObjectMessage(payload);
     message.setObject(payload);
     publisher.send(message);

     if (connection != null)  {
          connection.close();

}
     }
                                            !!!Zero-code change from JBM!!!

@TransactionAttribute(value = TransactionAttributeType.REQUIRED)
public void onMessage(Message message) {
     ObjectMessage obj = (ObjectMessage) message;
                                                                                          jms consumer
     try {
           Serializable ser = obj.getObject();
           log.info("[NotificationInbound] onMessage!");
     }
     catch (Exception e) {
           log.error("[NotificationInbound] ERROR[" + e.getMessage() + "]!!!****");
           throw new IllegalStateException();
     }
}
HornetQ standalone

hornetq
|___ bin
    |
    config
    |    |___ jboss-as-4
    |    |___ jboss-as-5
    |    |___ stand-alone
    |
    docs
    |    |___ api
    |    |___ quickstart-guide
    |    |___ user-manual
    |
    examples
    |    |___ core
    |    |___ javaee
    |    |___ jms
    |
    lib
    |
    licenses
    |
    schemas
HornetQ transport

HornetQ has a fully pluggable and highly flexible transport layer. The
transport layer defines its own Service Provider Interface (SPI) to
simplify plugging in a new transport provider.

Netty TCP
Netty SSL
Netty HTTP
Netty Servlet

acceptors are used on the server to define how connections are
accepted
hornetq-configuration.xml
<acceptor name="netty">
  <factory-class>
org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-
class>
  <param key="host" value="${jboss.bind.address:localhost}"/>
  <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
HornetQ transport

connectors are used by a client to define how it connects to a server


hornetq-configuration.xml
<connector name="netty">
 <factory-
class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</fact
ory-class>
 <param key="host" value="${jboss.bind.address:localhost}"/>
 <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
</connector>
HornetQ persistence

HornetQ handles persistence with a high-performance journal,
which is optimized for messaging-specific use cases.

The HornetQ journal is append only with a configurable file size,
which improves performance by enabling single write operations.
It consists of a set of files on disk, which are initially pre-created to a
fixed size and filled with padding.

As server operations (add message, delete message, update
message, etc.) are performed, records of the operations are
appended to the journal until the journal file is full, at which point the
next journal file is used.
HornetQ persistence

configuration in hornetq-configuration.xml

journal-directory
location of the message journal. default value is data/journal.

journal-type
valid values are NIO or ASYNCIO.
If NIO, the Java NIO journal is used.
If ASYNCIO, Linux asynchronous IO is used. If ASYNCIO is set on
a non-Linux or non-libaio system, HornetQ detectsthis and falls back
to NIO.

journal-sync-transactional
If true, HornetQ ensures all transaction data is flushed to disk on
transaction boundaries(commit, prepare, and rollback).
default is true.
HornetQ persistence

journal-file-size
size of each journal file in bytes.
default value is 10485760 bytes (10 megabytes).

journal-min-files
minimum number of files the journal maintains

journal-max-io
maximum number of write requests to hold in the IO queue.
Write requests are queued here before being submitted to the
system for execution. If the queue fills, writes are blocked until
space becomes available in the queue.

journal-compact-min-files
minimum number of files before the journal will be compacted.
default value is 10.
HornetQ flow control

Flow control is used to limit the flow of data between a client and
server, or a server and another server. It does this in order to
prevent the client or server being overwhelmed with data.

Consumer flow control
HornetQ consumers improve performance by buffering a certain
number of messages in a client-side buffer before passing them to
be consumed.

By default, the consumer-window-size is set to 1 MiB
The value can be:
• -1 for an unbound buffer
• 0 to not buffer any messages.
• >0 for a buffer with the given maximum size in bytes.
HornetQ flow control

configuration in hornetq-jms.xml


<connection-factory name="ConnectionFactory">
<connectors>
 <connector-ref connector-name="netty-connector"/>
</connectors>
<entries>
 <entry name="ConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
</connection-factory>
HornetQ flow control

It is also possible to control the rate at which a consumer can
consume messages.
This can be used to make sure that a consumer never consumes
messages at a rate faster than the rate specified.


<connection-factory name="ConnectionFactory">
<connectors>
 <connector-ref connector-name="netty-connector"/>
</connectors>
<entries>
 <entry name="ConnectionFactory"/>
</entries>
<consumer-max-rate>10</consumer-max-rate>
</connection-factory>
HornetQ flow control

It is possible to manage the flow control even for producers!

HornetQ also can limit the amount of data sent from a client to a
server to prevent the server being overwhelmed.


<connection-factory name="NettyConnectionFactory">
  <connectors>
   <connector-ref connector-name="netty-connector"/>
  </connectors>
  <entries>
    <entry name="/ConnectionFactory"/>
  </entries>
  <producer-window-size>10</producer-window-size>
</connection-factory>
HornetQ message redelivery

An undelivered message returns to the queue ready to be
redelivered.
There are two options for these undelivered messages:

Delayed Redelivery
Message delivery can be delayed to allow the client time to
recover from transient failures and not overload its network or CPU
resources.

Dead Letter Address
Configure a dead letter address, to which messages are sent after
being determined undeliverable.
HornetQ message redelivery

<address-setting match="jms.queue.exampleQueue">
  <redelivery-delay>5000</redelivery-delay>
</address-setting>



<address-setting match="jms.queue.exampleQueue">
  <dead-letter-address>jms.queue.deadLetterQueue</dead-
letter-address>
  <max-delivery-attempts>3</max-delivery-attempts>
</address-setting>
HornetQ large messages

HornetQ supports sending and receiving of large messages,
even when the client and server are running with limited memory.

As the InputStream is read, the data is sent to the server
as a stream of fragments. The server persists these fragments to
disk as it receives them. When the time comes to deliver them to a
consumer they are read back off the disk, also in fragments, and
sent down the wire.

When the consumer receives a large message it initially receives
just the message with an empty body. It can then set an
OutputStream on the message to stream the large message body to
a file on disk or elsewhere.
At no time is the entire message body stored fully in memory, either
on the client or the server.
HornetQ large messages

hornetq-configuration.xml
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
     ...
     <large-message-directory>/data/large-messages</large-message-directory>
     ...
</configuration>

hornetq-jms.xml
<connection-factory name="ConnectionFactory">
    <connectors>
        <connector-ref connector-name="netty"/>
    </connectors>
    <entries>
        <entry name="ConnectionFactory"/>
        <entry name="XAConnectionFactory"/>
    </entries>
    <min-large-message-size>250000</min-large-message-size>
</connection-factory>
HornetQ large messages

hornetq-configuration.xml
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
     ...
     <large-message-directory>/data/large-messages</large-message-directory>
     ...
</configuration>

hornetq-jms.xml
<connection-factory name="ConnectionFactory">
    <connectors>
        <connector-ref connector-name="netty"/>
    </connectors>
    <entries>
        <entry name="ConnectionFactory"/>
        <entry name="XAConnectionFactory"/>
    </entries>
    <min-large-message-size>250000</min-large-message-size>
</connection-factory>
HornetQ paging

HornetQ transparently supports huge queues containing millions of
messages while the server is running with limited memory.

In such a situation it's not possible to store all of the queues in
memory at one time, so HornetQ transparently pages messages
in and out of memory as they are needed. This allows massive
queues with a low memory footprint.

HornetQ will start paging messages to disk when the size of all
messages in memory for an address exceeds a configured
maximum size.

By default, HornetQ does not page messages; this must be explicitly
configured to activate it.
HornetQ paging

hornetq-configuration.xml
<paging-directory>/somewhere/paging-directory</paging-directory>


<address-settings>
<address-setting match="jms.someaddress">
<max-size-bytes>104857600</max-size-bytes>
<page-size-bytes>10485760</page-size-bytes>
<address-full-policy>PAGE</address-full-policy>
</address-setting>
</address-settings>

Address full policy:
PAGE further messages will be paged to disk.
DROP then further messages will be silently dropped.
BLOCK then client message producers will block when they try and send further
messages.
HornetQ high availabilty

HornetQ allows pairs of servers to be linked together as
live - backup pairs.

A backup server is owned by only one live server.
Backup servers are not operational until failover occurs.

When a live server crashes or is brought down in the correct mode,
the backup server currently in passive mode will become live and
another backup server will become passive. If a live server restarts
after a failover then it will have priority and be the next server to
become live when the current live server goes down, if the current
live server is configured to allow automatic failback then it will
detect the live server coming back up and automatically stop.
HornetQ high availabilty

configure the live and backup server to share their store, configure
both hornetq-configuration.xml
<shared-store>true</shared-store>

Additionally, the backup server must be flagged explicitly as a
backup:
<backup>true</backup>

In order for live - backup pairs to operate properly with a shared
store, both servers must have configured the location of journal
directory to point to the same shared location
HornetQ clustering
HornetQ clusters allow groups of HornetQ servers to be grouped
together in order to share message processing load. Each active
node in the cluster is an active HornetQ server which manages its
own messages and handles its own connections.

hornetq-configuration.xml
for each node set the parameter clustered to true


Server discovery is a mechanism by which servers can propagate
their connection details to:
Messaging clients. A messaging client wants to be able to connect to
the servers of the cluster without having specific knowledge of which
servers in the cluster are up at any one time.
Other servers. Servers in a cluster want to be able to create cluster
connections to each other without having prior knowledge of all the
other servers in the cluster.
Server discovery uses User Datagram Protocol (UDP) multicast to
broadcast server connection settings.
HornetQ clustering

hornetq-configuration.xml
<discovery-groups>
 <discovery-group name="my-discovery-group">
   <local-bind-address>172.16.9.7</local-bind-address>
   <group-address>231.7.7.7</group-address>
   <group-port>9876</group-port>
   <refresh-timeout>10000</refresh-timeout>
 </discovery-group>
</discovery-groups>


<connection-factory name="ConnectionFactory">
 <discovery-group-ref discovery-group-name="my-discovery-group"/>
  <entries>
    <entry name="/ConnectionFactory"/>
  </entries>
</connection-factory>
HornetQ clustering

  In case the connection is not downloaded by JNDI...


final String groupAddress = "231.7.7.7";


final int groupPort = 9876;


ConnectionFactory jmsConnectionFactory =
   HornetQJMSClient.createConnectionFactory(groupAddress, groupPort);


Connection jmsConnection1 = jmsConnectionFactory.createConnection();


Connection jmsConnection2 = jmsConnectionFactory.createConnection();
HornetQ clustering

Server Side load balancing

hornetq-configuration.xml
<cluster-connections>
  <cluster-connection name="my-cluster">
    <address>jms</address>
    <retry-interval>500</retry-interval>
    <use-duplicate-detection>true</use-duplicate-detection>
    <forward-when-no-consumers>false</forward-when-no-consumers>
    <max-hops>1</max-hops>
    <discovery-group-ref discovery-group-name="my-discovery-group"/>
  </cluster-connection>
</cluster-connections>
HornetQ clustering

Client Side load balancing

hornetq-jms.xml
<connection-factory name="ConnectionFactory">
  <discovery-group-ref discovery-group-name="my-discovery-group"/>
  <entries>
    <entry name="/ConnectionFactory"/>
  </entries>
  <ha>true</ha>
  <connection-load-balancing-policy-class-name>
org.hornetq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
  </connection-load-balancing-policy-class-name>
</connection-factory>
HornetQ other features

Routing messages with wildcards
e.g. queue is created with an address of queue.news.#
queue.news.europe or queue.news.usa or queue.news.usa.sport

Message expire
HornetQ will not deliver a message to a consumer after it's time to
live has been exceeded.
If the message hasn't been delivered before the time to live is
reached, the server can discard it.
// message will expire in 5000ms from now
message.setExpiration(System.currentTimeMillis() + 5000);

Expiry-address
<!-- expired messages in exampleQueue will be sent to the expiry
address expiryQueue -->
<address-setting match="jms.queue.exampleQueue">
<expiry-address>jms.queue.expiryQueue</expiry-address>
</address-setting>
HornetQ other features

Scheduled messages
TextMessage message = session.createTextMessage("MSG");
message.setLongProperty("_HQ_SCHED_DELIVERY", System.currentTimeMillis() + 5000);
producer.send(message);
...
// message will not be received immediately but 5 seconds later
TextMessage messageReceived = (TextMessage) consumer.receive();


Message group
Message groups are sets of messages that have the following characteristics:
• Messages in a message group share the same group id; that is, they have the same group
identifier property (JMSXGroupID for JMS, _HQ_GROUP_ID for HornetQ Core API).
• Messages in a message group are always consumed by the same consumer, even if there
are many consumers on a queue. They pin all messages with the same group id to the same
consumer.
If that consumer closes another consumer is chosen and will receive all messages with the
samegroup id.
HornetQ other features

Based on message

Message message = ...
message.setStringProperty("JMSXGroupID", "Group-0");
producer.send(message);
message = ...
message.setStringProperty("JMSXGroupID", "Group-0");
producer.send(message);


Based on connection factory...

<connection-factory name="ConnectionFactory">
                                                    hornetq-
<connectors>
                                                    jms.xml
<connector-ref connector-name="netty-connector"/>
</connectors>
<entries>
<entry name="ConnectionFactory"/>
</entries>
<group-id>Group-0</group-id>
</connection-factory>
HornetQ other features

Diverts
Diverts are objects that transparently divert messages routed to one address to
some other address,without making any changes to any client application logic.
Diverts can also be configured to apply a Transformer.

An exclusive divert diverts all matching messages that are routed to the old
address to the new address.
Matching messages do not get routed to the old address.


hornetq-configuration.xml
<divert name="prices-divert">
<address>jms.topic.priceUpdates</address>
<forwarding-address>jms.queue.priceForwarding</forwarding-address>
<filter string="office='New York'"/>
<transformer-class-name>
org.hornetq.jms.example.AddForwardingTimeTransformer
</transformer-class-name>
<exclusive>true</exclusive>
</divert>
HornetQ other features

Diverts
Non-exclusive diverts forward a copy of a message to a new address, allowing the original
message to continue to the previous address.


hornetq-configuration.xml
<divert name="order-divert">
     <address>jms.queue.orders</address>
     <forwarding-address>jms.topic.spyTopic</forwarding-address>
     <exclusive>false</exclusive>
</divert>
Faster & Greater Messaging System
            HornetQ zzz

                     THANKS!!!

Weitere ähnliche Inhalte

Was ist angesagt?

The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerVladimir Sedach
 
vert.x 소개 및 개발 실습
vert.x 소개 및 개발 실습vert.x 소개 및 개발 실습
vert.x 소개 및 개발 실습John Kim
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Minchul Jung
 
30 Minutes To CPAN
30 Minutes To CPAN30 Minutes To CPAN
30 Minutes To CPANdaoswald
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Servermohamedmoharam
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New EvolutionAllan Huang
 
Apache Commons Pool and DBCP - Version 2 Update
Apache Commons Pool and DBCP - Version 2 UpdateApache Commons Pool and DBCP - Version 2 Update
Apache Commons Pool and DBCP - Version 2 UpdatePhil Steitz
 
Toster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability OptionsToster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability OptionsFabio Akita
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for WindowsFord AntiTrust
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configurationDima Gomaa
 
Apc presentation
Apc presentationApc presentation
Apc presentationguestef8544
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clusteringgouthamrv
 
Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)nazeer pasha
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesciklum_ods
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Ontico
 

Was ist angesagt? (20)

The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
 
vert.x 소개 및 개발 실습
vert.x 소개 및 개발 실습vert.x 소개 및 개발 실습
vert.x 소개 및 개발 실습
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법
 
30 Minutes To CPAN
30 Minutes To CPAN30 Minutes To CPAN
30 Minutes To CPAN
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Tomcat New Evolution
Tomcat New EvolutionTomcat New Evolution
Tomcat New Evolution
 
Apache Commons Pool and DBCP - Version 2 Update
Apache Commons Pool and DBCP - Version 2 UpdateApache Commons Pool and DBCP - Version 2 Update
Apache Commons Pool and DBCP - Version 2 Update
 
Php version 5
Php version 5Php version 5
Php version 5
 
Node.js 1, 2, 3
Node.js 1, 2, 3Node.js 1, 2, 3
Node.js 1, 2, 3
 
Toster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability OptionsToster - Understanding the Rails Web Model and Scalability Options
Toster - Understanding the Rails Web Model and Scalability Options
 
Tomcat
TomcatTomcat
Tomcat
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
 
Apc presentation
Apc presentationApc presentation
Apc presentation
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clustering
 
Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
 
Fluentd in Co-Work
Fluentd in Co-WorkFluentd in Co-Work
Fluentd in Co-Work
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
 

Ähnlich wie Faster & Greater Messaging with HornetQ

Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Jagadish Prasath
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the wayOleg Podsechin
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasyJBug Italy
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgradesharmami
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixBruce Snyder
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINAtrustinlee
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extremeyinonavraham
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serializationGWTcon
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7Bruno Borges
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19Joseph Kuo
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Red Hat Developers
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.xYiguang Hu
 
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by OutbrainOB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by OutbrainEran Harel
 

Ähnlich wie Faster & Greater Messaging with HornetQ (20)

JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014
 
J boss
J bossJ boss
J boss
 
Server side JavaScript: going all the way
Server side JavaScript: going all the wayServer side JavaScript: going all the way
Server side JavaScript: going all the way
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Java EE7
Java EE7Java EE7
Java EE7
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgrade
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINA
 
Taking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the ExtremeTaking Jenkins Pipeline to the Extreme
Taking Jenkins Pipeline to the Extreme
 
GWT Web Socket and data serialization
GWT Web Socket and data serializationGWT Web Socket and data serialization
GWT Web Socket and data serialization
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Introduction to Vert.x
Introduction to Vert.xIntroduction to Vert.x
Introduction to Vert.x
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by OutbrainOB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
 

Mehr von JBug Italy

JBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testingJBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testingJBug Italy
 
Intro jbug milano_26_set2012
Intro jbug milano_26_set2012Intro jbug milano_26_set2012
Intro jbug milano_26_set2012JBug Italy
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMJBug Italy
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBug Italy
 
JBoss AS7 Overview
JBoss AS7 OverviewJBoss AS7 Overview
JBoss AS7 OverviewJBug Italy
 
Intro JBug Milano - January 2012
Intro JBug Milano - January 2012Intro JBug Milano - January 2012
Intro JBug Milano - January 2012JBug Italy
 
JBoss AS7 Webservices
JBoss AS7 WebservicesJBoss AS7 Webservices
JBoss AS7 WebservicesJBug Italy
 
Intro JBug Milano - September 2011
Intro JBug Milano - September 2011Intro JBug Milano - September 2011
Intro JBug Milano - September 2011JBug Italy
 
All the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSAll the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSJBug Italy
 
Infinispan and Enterprise Data Grid
Infinispan and Enterprise Data GridInfinispan and Enterprise Data Grid
Infinispan and Enterprise Data GridJBug Italy
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools IntroductionJBug Italy
 
September 2010 - Arquillian
September 2010 - ArquillianSeptember 2010 - Arquillian
September 2010 - ArquillianJBug Italy
 
September 2010 - Gatein
September 2010 - GateinSeptember 2010 - Gatein
September 2010 - GateinJBug Italy
 
May 2010 - Infinispan
May 2010 - InfinispanMay 2010 - Infinispan
May 2010 - InfinispanJBug Italy
 
May 2010 - Drools flow
May 2010 - Drools flowMay 2010 - Drools flow
May 2010 - Drools flowJBug Italy
 
May 2010 - Hibernate search
May 2010 - Hibernate searchMay 2010 - Hibernate search
May 2010 - Hibernate searchJBug Italy
 
April 2010 - Seam unifies JEE5
April 2010 - Seam unifies JEE5April 2010 - Seam unifies JEE5
April 2010 - Seam unifies JEE5JBug Italy
 

Mehr von JBug Italy (20)

JBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testingJBoss Wise: breaking barriers to WS testing
JBoss Wise: breaking barriers to WS testing
 
AS7 and CLI
AS7 and CLIAS7 and CLI
AS7 and CLI
 
Intro jbug milano_26_set2012
Intro jbug milano_26_set2012Intro jbug milano_26_set2012
Intro jbug milano_26_set2012
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
 
AS7
AS7AS7
AS7
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logic
 
JBoss AS7 Overview
JBoss AS7 OverviewJBoss AS7 Overview
JBoss AS7 Overview
 
Intro JBug Milano - January 2012
Intro JBug Milano - January 2012Intro JBug Milano - January 2012
Intro JBug Milano - January 2012
 
JBoss AS7 Webservices
JBoss AS7 WebservicesJBoss AS7 Webservices
JBoss AS7 Webservices
 
JBoss AS7
JBoss AS7JBoss AS7
JBoss AS7
 
Intro JBug Milano - September 2011
Intro JBug Milano - September 2011Intro JBug Milano - September 2011
Intro JBug Milano - September 2011
 
All the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMSAll the cool stuff of JBoss BRMS
All the cool stuff of JBoss BRMS
 
Infinispan and Enterprise Data Grid
Infinispan and Enterprise Data GridInfinispan and Enterprise Data Grid
Infinispan and Enterprise Data Grid
 
Drools Introduction
Drools IntroductionDrools Introduction
Drools Introduction
 
September 2010 - Arquillian
September 2010 - ArquillianSeptember 2010 - Arquillian
September 2010 - Arquillian
 
September 2010 - Gatein
September 2010 - GateinSeptember 2010 - Gatein
September 2010 - Gatein
 
May 2010 - Infinispan
May 2010 - InfinispanMay 2010 - Infinispan
May 2010 - Infinispan
 
May 2010 - Drools flow
May 2010 - Drools flowMay 2010 - Drools flow
May 2010 - Drools flow
 
May 2010 - Hibernate search
May 2010 - Hibernate searchMay 2010 - Hibernate search
May 2010 - Hibernate search
 
April 2010 - Seam unifies JEE5
April 2010 - Seam unifies JEE5April 2010 - Seam unifies JEE5
April 2010 - Seam unifies JEE5
 

Kürzlich hochgeladen

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Kürzlich hochgeladen (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Faster & Greater Messaging with HornetQ

  • 1. Faster & Greater Messaging System HornetQ zzz Giovanni Marigi gmarigi at redhat.com Middleware Consultant JBoss, a Division of Red Hat
  • 2. Agenda o Intro o Core o EAP and standalone o Transport o Persistence & large messages o Flow control o Clustering & High Availability o Other features
  • 3. Some stats HornetQ sets a record breaking score in the SPECjms2007 industry standard benchmark for JMS messaging system performance. HornetQ 2.0.GA obtained scores up to 307% higher than previously published SPECjms2007 benchmark results, on the same server hardware and operating system set-up. The peer-reviewed results are available on the spec.org web-site: www.spec.org/jms2007/results/jms2007.html 8.2 messages per second with SpecJMS http://planet.jboss.org/post/8_2_million_messages_second_with_specjms The results were obtained by Kai Sachs and Stefan Appel from an independent research group at the TU Darmstadt, Germany. Their release announcement can be found here: www.dvs.tu-darmstadt.de/news/specjms2007Results_HornetQ.html
  • 4. HornetQ core HornetQ core is designed simply as a set of POJOs. It has also been designed to have as few dependencies on external jars as possible. As a result HornetQ core has only one more jar dependency than the standard JDK classes; netty.jar netty buffer classes are used internally. Each HornetQ server has its own ultra high performance persistent journal, which it uses for messaging and other persistence. Using a high performance journal allows persistence message performance, which is something not achievable when using a relational database for persistence.
  • 5. HornetQ modes HornetQ currently provides two APIs for messaging at the client side: Core client API simple intuitive Java API that allows the full set of messaging functionality without some of the complexities of JMS. JMS client API standard JMS API JMS semantics are implemented by a thin JMS facade layer on the client side. The HornetQ server does not associate with JMS and does not know anything about JMS. It is a protocol agnostic messaging server designed to be used with multiple different protocols. When a user uses the JMS API on the client side, all JMS interactions are translated into operations on the HornetQ core client API before being transferred over the wire using the HornetQ wire format.
  • 7. HornetQ in EAP JBoss EAP 5.1.x - not the default messaging system - easy to switch from JBM to HornetQ - JBM or HornetQ not together! JBoss EAP 6.x - default JMS implementation HornetQ configuration in JBoss EAP 5.1.x jboss/$profile/deploy/hornetq - hornetq-configuration.xml - hornetq-jms.xml HornetQ configuration in JBoss EAP 6.x jboss/standalone/configuration - standalone-*.xml jboss/domain/configuration - domain.xml
  • 8. HornetQ in EAP 6 <security-settings> <security-setting match="#"> <permission type="send" roles="guest"/> <permission type="consume" roles="guest"/> security <permission type="createNonDurableQueue" roles="guest"/> <permission type="deleteNonDurableQueue" roles="guest"/> </security-setting> </security-settings> <address-settings> <address-setting match="#"> <dead-letter-address>jms.queue.DLQ</dead-letter-address> <expiry-address>jms.queue.ExpiryQueue</expiry-address> <redelivery-delay>0</redelivery-delay> <max-size-bytes>10485760</max-size-bytes> addressing <address-full-policy>BLOCK</address-full-policy> <message-counter-history-day-limit>10</message-counter-history-day-limit> </address-setting> </address-settings>
  • 9. HornetQ in EAP 6 <jms-connection-factories> <connection-factory name="InVmConnectionFactory"> <connectors> <connector-ref connector-name="in-vm"/> </connectors> connection factories <entries> <entry name="java:/ConnectionFactory"/> </entries> </connection-factory> <connection-factory name="RemoteConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> </entries> </connection-factory>
  • 10. HornetQ in EAP 6 <pooled-connection-factory name="hornetq-ra"> <transaction mode="xa"/> <connectors> <connector-ref connector-name="in-vm"/> </connectors> <entries> <entry name="java:/JmsXA"/> </entries> </pooled-connection-factory> </jms-connection-factories> jms destinations <jms-destinations> <jms-queue name="notificationQueue"> <entry name="/queue/notificationQueue"/> </jms-queue> </jms-destinations> </hornetq-server>
  • 11. HornetQ in EAP 6 public void sendToQueue(String destinationName,Serializable payload) throws Exception { InitialContext ic = new InitialContext(); ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory"); Queue queue = (Queue)ic.lookup(destinationName); Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer publisher = session.createProducer(queue); connection.start(); jms producer ObjectMessage message = session.createObjectMessage(payload); message.setObject(payload); publisher.send(message); if (connection != null) { connection.close(); } } !!!Zero-code change from JBM!!! @TransactionAttribute(value = TransactionAttributeType.REQUIRED) public void onMessage(Message message) { ObjectMessage obj = (ObjectMessage) message; jms consumer try { Serializable ser = obj.getObject(); log.info("[NotificationInbound] onMessage!"); } catch (Exception e) { log.error("[NotificationInbound] ERROR[" + e.getMessage() + "]!!!****"); throw new IllegalStateException(); } }
  • 12. HornetQ standalone hornetq |___ bin | config | |___ jboss-as-4 | |___ jboss-as-5 | |___ stand-alone | docs | |___ api | |___ quickstart-guide | |___ user-manual | examples | |___ core | |___ javaee | |___ jms | lib | licenses | schemas
  • 13. HornetQ transport HornetQ has a fully pluggable and highly flexible transport layer. The transport layer defines its own Service Provider Interface (SPI) to simplify plugging in a new transport provider. Netty TCP Netty SSL Netty HTTP Netty Servlet acceptors are used on the server to define how connections are accepted hornetq-configuration.xml <acceptor name="netty"> <factory-class> org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory- class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.port:5445}"/> </acceptor>
  • 14. HornetQ transport connectors are used by a client to define how it connects to a server hornetq-configuration.xml <connector name="netty"> <factory- class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</fact ory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.port:5445}"/> </connector>
  • 15. HornetQ persistence HornetQ handles persistence with a high-performance journal, which is optimized for messaging-specific use cases. The HornetQ journal is append only with a configurable file size, which improves performance by enabling single write operations. It consists of a set of files on disk, which are initially pre-created to a fixed size and filled with padding. As server operations (add message, delete message, update message, etc.) are performed, records of the operations are appended to the journal until the journal file is full, at which point the next journal file is used.
  • 16. HornetQ persistence configuration in hornetq-configuration.xml journal-directory location of the message journal. default value is data/journal. journal-type valid values are NIO or ASYNCIO. If NIO, the Java NIO journal is used. If ASYNCIO, Linux asynchronous IO is used. If ASYNCIO is set on a non-Linux or non-libaio system, HornetQ detectsthis and falls back to NIO. journal-sync-transactional If true, HornetQ ensures all transaction data is flushed to disk on transaction boundaries(commit, prepare, and rollback). default is true.
  • 17. HornetQ persistence journal-file-size size of each journal file in bytes. default value is 10485760 bytes (10 megabytes). journal-min-files minimum number of files the journal maintains journal-max-io maximum number of write requests to hold in the IO queue. Write requests are queued here before being submitted to the system for execution. If the queue fills, writes are blocked until space becomes available in the queue. journal-compact-min-files minimum number of files before the journal will be compacted. default value is 10.
  • 18. HornetQ flow control Flow control is used to limit the flow of data between a client and server, or a server and another server. It does this in order to prevent the client or server being overwhelmed with data. Consumer flow control HornetQ consumers improve performance by buffering a certain number of messages in a client-side buffer before passing them to be consumed. By default, the consumer-window-size is set to 1 MiB The value can be: • -1 for an unbound buffer • 0 to not buffer any messages. • >0 for a buffer with the given maximum size in bytes.
  • 19. HornetQ flow control configuration in hornetq-jms.xml <connection-factory name="ConnectionFactory"> <connectors> <connector-ref connector-name="netty-connector"/> </connectors> <entries> <entry name="ConnectionFactory"/> </entries> <consumer-window-size>0</consumer-window-size> </connection-factory>
  • 20. HornetQ flow control It is also possible to control the rate at which a consumer can consume messages. This can be used to make sure that a consumer never consumes messages at a rate faster than the rate specified. <connection-factory name="ConnectionFactory"> <connectors> <connector-ref connector-name="netty-connector"/> </connectors> <entries> <entry name="ConnectionFactory"/> </entries> <consumer-max-rate>10</consumer-max-rate> </connection-factory>
  • 21. HornetQ flow control It is possible to manage the flow control even for producers! HornetQ also can limit the amount of data sent from a client to a server to prevent the server being overwhelmed. <connection-factory name="NettyConnectionFactory"> <connectors> <connector-ref connector-name="netty-connector"/> </connectors> <entries> <entry name="/ConnectionFactory"/> </entries> <producer-window-size>10</producer-window-size> </connection-factory>
  • 22. HornetQ message redelivery An undelivered message returns to the queue ready to be redelivered. There are two options for these undelivered messages: Delayed Redelivery Message delivery can be delayed to allow the client time to recover from transient failures and not overload its network or CPU resources. Dead Letter Address Configure a dead letter address, to which messages are sent after being determined undeliverable.
  • 23. HornetQ message redelivery <address-setting match="jms.queue.exampleQueue"> <redelivery-delay>5000</redelivery-delay> </address-setting> <address-setting match="jms.queue.exampleQueue"> <dead-letter-address>jms.queue.deadLetterQueue</dead- letter-address> <max-delivery-attempts>3</max-delivery-attempts> </address-setting>
  • 24. HornetQ large messages HornetQ supports sending and receiving of large messages, even when the client and server are running with limited memory. As the InputStream is read, the data is sent to the server as a stream of fragments. The server persists these fragments to disk as it receives them. When the time comes to deliver them to a consumer they are read back off the disk, also in fragments, and sent down the wire. When the consumer receives a large message it initially receives just the message with an empty body. It can then set an OutputStream on the message to stream the large message body to a file on disk or elsewhere. At no time is the entire message body stored fully in memory, either on the client or the server.
  • 25. HornetQ large messages hornetq-configuration.xml <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd"> ... <large-message-directory>/data/large-messages</large-message-directory> ... </configuration> hornetq-jms.xml <connection-factory name="ConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="ConnectionFactory"/> <entry name="XAConnectionFactory"/> </entries> <min-large-message-size>250000</min-large-message-size> </connection-factory>
  • 26. HornetQ large messages hornetq-configuration.xml <configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd"> ... <large-message-directory>/data/large-messages</large-message-directory> ... </configuration> hornetq-jms.xml <connection-factory name="ConnectionFactory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="ConnectionFactory"/> <entry name="XAConnectionFactory"/> </entries> <min-large-message-size>250000</min-large-message-size> </connection-factory>
  • 27. HornetQ paging HornetQ transparently supports huge queues containing millions of messages while the server is running with limited memory. In such a situation it's not possible to store all of the queues in memory at one time, so HornetQ transparently pages messages in and out of memory as they are needed. This allows massive queues with a low memory footprint. HornetQ will start paging messages to disk when the size of all messages in memory for an address exceeds a configured maximum size. By default, HornetQ does not page messages; this must be explicitly configured to activate it.
  • 29. HornetQ high availabilty HornetQ allows pairs of servers to be linked together as live - backup pairs. A backup server is owned by only one live server. Backup servers are not operational until failover occurs. When a live server crashes or is brought down in the correct mode, the backup server currently in passive mode will become live and another backup server will become passive. If a live server restarts after a failover then it will have priority and be the next server to become live when the current live server goes down, if the current live server is configured to allow automatic failback then it will detect the live server coming back up and automatically stop.
  • 30. HornetQ high availabilty configure the live and backup server to share their store, configure both hornetq-configuration.xml <shared-store>true</shared-store> Additionally, the backup server must be flagged explicitly as a backup: <backup>true</backup> In order for live - backup pairs to operate properly with a shared store, both servers must have configured the location of journal directory to point to the same shared location
  • 31. HornetQ clustering HornetQ clusters allow groups of HornetQ servers to be grouped together in order to share message processing load. Each active node in the cluster is an active HornetQ server which manages its own messages and handles its own connections. hornetq-configuration.xml for each node set the parameter clustered to true Server discovery is a mechanism by which servers can propagate their connection details to: Messaging clients. A messaging client wants to be able to connect to the servers of the cluster without having specific knowledge of which servers in the cluster are up at any one time. Other servers. Servers in a cluster want to be able to create cluster connections to each other without having prior knowledge of all the other servers in the cluster. Server discovery uses User Datagram Protocol (UDP) multicast to broadcast server connection settings.
  • 32. HornetQ clustering hornetq-configuration.xml <discovery-groups> <discovery-group name="my-discovery-group"> <local-bind-address>172.16.9.7</local-bind-address> <group-address>231.7.7.7</group-address> <group-port>9876</group-port> <refresh-timeout>10000</refresh-timeout> </discovery-group> </discovery-groups> <connection-factory name="ConnectionFactory"> <discovery-group-ref discovery-group-name="my-discovery-group"/> <entries> <entry name="/ConnectionFactory"/> </entries> </connection-factory>
  • 33. HornetQ clustering In case the connection is not downloaded by JNDI... final String groupAddress = "231.7.7.7"; final int groupPort = 9876; ConnectionFactory jmsConnectionFactory = HornetQJMSClient.createConnectionFactory(groupAddress, groupPort); Connection jmsConnection1 = jmsConnectionFactory.createConnection(); Connection jmsConnection2 = jmsConnectionFactory.createConnection();
  • 34. HornetQ clustering Server Side load balancing hornetq-configuration.xml <cluster-connections> <cluster-connection name="my-cluster"> <address>jms</address> <retry-interval>500</retry-interval> <use-duplicate-detection>true</use-duplicate-detection> <forward-when-no-consumers>false</forward-when-no-consumers> <max-hops>1</max-hops> <discovery-group-ref discovery-group-name="my-discovery-group"/> </cluster-connection> </cluster-connections>
  • 35. HornetQ clustering Client Side load balancing hornetq-jms.xml <connection-factory name="ConnectionFactory"> <discovery-group-ref discovery-group-name="my-discovery-group"/> <entries> <entry name="/ConnectionFactory"/> </entries> <ha>true</ha> <connection-load-balancing-policy-class-name> org.hornetq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy </connection-load-balancing-policy-class-name> </connection-factory>
  • 36. HornetQ other features Routing messages with wildcards e.g. queue is created with an address of queue.news.# queue.news.europe or queue.news.usa or queue.news.usa.sport Message expire HornetQ will not deliver a message to a consumer after it's time to live has been exceeded. If the message hasn't been delivered before the time to live is reached, the server can discard it. // message will expire in 5000ms from now message.setExpiration(System.currentTimeMillis() + 5000); Expiry-address <!-- expired messages in exampleQueue will be sent to the expiry address expiryQueue --> <address-setting match="jms.queue.exampleQueue"> <expiry-address>jms.queue.expiryQueue</expiry-address> </address-setting>
  • 37. HornetQ other features Scheduled messages TextMessage message = session.createTextMessage("MSG"); message.setLongProperty("_HQ_SCHED_DELIVERY", System.currentTimeMillis() + 5000); producer.send(message); ... // message will not be received immediately but 5 seconds later TextMessage messageReceived = (TextMessage) consumer.receive(); Message group Message groups are sets of messages that have the following characteristics: • Messages in a message group share the same group id; that is, they have the same group identifier property (JMSXGroupID for JMS, _HQ_GROUP_ID for HornetQ Core API). • Messages in a message group are always consumed by the same consumer, even if there are many consumers on a queue. They pin all messages with the same group id to the same consumer. If that consumer closes another consumer is chosen and will receive all messages with the samegroup id.
  • 38. HornetQ other features Based on message Message message = ... message.setStringProperty("JMSXGroupID", "Group-0"); producer.send(message); message = ... message.setStringProperty("JMSXGroupID", "Group-0"); producer.send(message); Based on connection factory... <connection-factory name="ConnectionFactory"> hornetq- <connectors> jms.xml <connector-ref connector-name="netty-connector"/> </connectors> <entries> <entry name="ConnectionFactory"/> </entries> <group-id>Group-0</group-id> </connection-factory>
  • 39. HornetQ other features Diverts Diverts are objects that transparently divert messages routed to one address to some other address,without making any changes to any client application logic. Diverts can also be configured to apply a Transformer. An exclusive divert diverts all matching messages that are routed to the old address to the new address. Matching messages do not get routed to the old address. hornetq-configuration.xml <divert name="prices-divert"> <address>jms.topic.priceUpdates</address> <forwarding-address>jms.queue.priceForwarding</forwarding-address> <filter string="office='New York'"/> <transformer-class-name> org.hornetq.jms.example.AddForwardingTimeTransformer </transformer-class-name> <exclusive>true</exclusive> </divert>
  • 40. HornetQ other features Diverts Non-exclusive diverts forward a copy of a message to a new address, allowing the original message to continue to the previous address. hornetq-configuration.xml <divert name="order-divert"> <address>jms.queue.orders</address> <forwarding-address>jms.topic.spyTopic</forwarding-address> <exclusive>false</exclusive> </divert>
  • 41. Faster & Greater Messaging System HornetQ zzz THANKS!!!