0% found this document useful (0 votes)
104 views46 pages

Enterprise Messaging With Apache Activemq: James Strachan

This document provides an overview of enterprise messaging with Apache ActiveMQ. It discusses what messaging is, describes the core components of Apache ActiveMQ like topics, queues, clients, selectors, wildcards, broker architecture, message persistence, security, transports, failover, wire formats including OpenWire and STOMP, monitoring, testing, visualization tools, prefetch, exclusive consumers, message groups, total ordering, consumer priority, virtual destinations, mirrored queues, and integrating with other systems using Enterprise Integration Patterns and Camel. More information can be found on the Apache ActiveMQ website.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views46 pages

Enterprise Messaging With Apache Activemq: James Strachan

This document provides an overview of enterprise messaging with Apache ActiveMQ. It discusses what messaging is, describes the core components of Apache ActiveMQ like topics, queues, clients, selectors, wildcards, broker architecture, message persistence, security, transports, failover, wire formats including OpenWire and STOMP, monitoring, testing, visualization tools, prefetch, exclusive consumers, message groups, total ordering, consumer priority, virtual destinations, mirrored queues, and integrating with other systems using Enterprise Integration Patterns and Camel. More information can be found on the Apache ActiveMQ website.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Enterprise Messaging with

Apache ActiveMQ

James Strachan
http://macstrac.blogspot.com/

http://open.iona.com/
What is messaging?
Messaging 101
Topics
Queues
What is Apache ActiveMQ?
What is Apache ActiveMQ

http://activemq.apache.org/
Clients

C Java Pike

C++ JavaScript Python

C#/.NET Perl Ruby

Flash PHP Smalltalk


Selectors

• Provide content based filtering on messages using SQL 92 syntax

• Customer = ‘gold’ and product in (1, 2, 3) and JMSPriority > 5

• Supports XPath on the message body for XML messages


Wildcards

•Products.Books.Computing.EIP

•Products.Books.Computing.*

•Products.>
Broker Architecture
Message Persistence
Security
Transports
URIs

<protocol>://<host>:<port>?<transport-options>

Examples

tcp://localhost:61616

vm://localhost?broker.persistent=false
Failover

failover:(tcp://host1:61616,tcp://host2:61616)?initialReconnectDelay=100
Wire Formats

•OpenWire

•STOMP

•HTTP / REST
Wire Formats: OpenWire

•binary

•small and fast

•code generated marshalling in C, C++, C# and Java

•a fair amount of work to port to other languages


Wire Formats: STOMP

• text based for the headers like HTTP

• very easy to create a client in any language

• tons of clients in most popular programming languages


Stomp : Connecting

CONNECT

login:<username>

passcode:<passcode>

^@
Stomp : Sending

SEND
destination:/queue/orders.books
reply-to:/temporaryQueue/James
correlation-id:4324234
amazonSecurityToken:abc234
amazonCustomerRating:gold

<order id=“123” customer=“jstrachan”>


<book isin=“1234”/>
<book isin=“456”/>
</order>
^@
Stomp: Subscribe

SUBSCRIBE
destination:/queue/orders.books

^@
Stomp : Receive messages

MESSAGE
destination:/queue/orders.books
Message-id:abc123
reply-to:/temporaryQueue/james134

This is the message


^@
Broker Architecture
Types of connectors
Kinds of topology
Kinds of topology
Kinds of topology
Clustering with Master / Slave

•Pure

•Shared File System

•Shared Database
Cool Stuff!
Monitoring
Easy Unit Testing of JMS code

ConnectionFactory factory =

new ActiveMQConnectionFactory(“vm://localhost?broker.persistent=false”);
Visualisation
Prefetch

new ActiveMQQueue("TEST.QUEUE?consumer.prefetchSize=10");
Exclusive Consumers
Message Groups
Total Ordering
Consumer Priority

new ActiveMQQueue("TEST.QUEUE?consumer.priority=10");
Virtual Destinations
Mirrored Queues
Enterprise Integration Patterns via Camel
http://activemq.apache.org/camel/
Bridge to other protocols

http://activemq.apache.org/camel/components.html

activemq ibatis mail rmi udp

activemq.journal imap mina rnc validation

bean irc mock rng velocity

cxf jdbc msv seda vm

direct jetty multicast sftp xmpp

event jbi pojo smtp xquery

file jms pop string-template xslt

ftp jpa quartz timer webdav

http log queue tcp


Example

<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="file://quotes"/>
<filter>
<xpath>/quote/product = ‘widget’</xpath>
<to uri="activemq:WidgetQuotes"/>
</filter>
</route>
</camelContext>
Where do I get more info?

http://activemq.apache.org/
Questions?
James Strachan

blog

http://macstrac.blogspot.com/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy