2. Open MQ
• Premier Open Source, Community MOM platform
> Also available with commercial support and license
• Provides enterprise level messaging
> Publish Subscribe, Point to Point
• Complete range of resilience
> In-memory pub-sub; distributed persistence store; distributed
in-flight data availability
> Support for distributed disk clustering
> HA support via Sun Cluster or JDBC HA Database
• JMX Admin. Interface (or stand-alone client Admin.)
Sun Confidential: Internal Only 2
3. Connectivity in MQ
• Rich API Support
> JMS API
> C API
– Now with XA support
• Simple UMS API
> POX, URL-Query-String
• Clients connect via
TCP/TLS or SOAP / HTTP
• JCA Resource Adapter
> Supports JMSRA, JMSJCA,
GenericRA
Sun Confidential: Internal Only 3
4. What's new In MQ
• Version 4.2 added
> Wild-card Topic Destinations
– Added *, **, >, syntax to Topic names
> XML Validation
– XML messages can be rejected if they fail validation
• Version 4.3 adds
> Universal Message Service (UMS)
– Provides simple API for any web-enabled client
– Scriptable URI formed commands or XML documents
> Support updates
– Windows 2008, Windows Vista, MySQL, MySQL Cluster Edition, AIX
(with c API and DB2 support on AIX)
Sun Confidential: Internal Only 4
5. Complete Platform Matrix
• Sun Solaris 9, 10 – SPARC, x86 – 32 or 64 bit
• Linux – Red Hat 4 & 5
• Windows – XP, Vista, 2003 Server, 2008 Server
• AIX – 6.1
• Other Platforms
> GlassFish Distributions include
– Ubuntu, Macintosh OSX
• JDBC Databases
> MySQL (Community, Enterprise Cluster)
> Oracle 10, 11
> HADB (GlassFish Enterprise Server, HA Profile)
> Java DB
> Postgresql
> DB2 (AIX Only)
• JDK 1.5, 1.6.0_10*
Sun Confidential: Internal Only 5
6. Performance, 4.3 Compared To 4.2
• Overall performance
improved 8%
% Improvement MQ 4.3 over MQ 4.2
14%
• HADB performance is
13%
12%
improved by 3x!
11%
% Improvement
10%
9%
> Optimized queries
8%
7%
6%
> Reduced serialization
5%
caused by HADB
4%
3%
implementation
2%
1%
0%
Overall
Queue All
Queue NP
Topic All
Topic P
Queue P
Topic NP
Sun Confidential: Internal Only 6
7. MQ Connectivity
Java EE – e.g. GlassFish 2.1
MDB ContainerEJB Container Web Container
JMS Servlet UMS Servlet
MDB EJB / JMS
JM
JMS
RA RA S
JMS Client
MQ Broker (Cluster)
MQ MQ MQ
C/C++
Broker Broker Broker
Client
Sun Confidential: Internal Only 7
8. Community Information
• Open MQ Wiki
> Community examples
– Samples for Spring integration
– Samples for STOMP Connect
Stream Oriented Messaging Protocol
–
– jRuby example
– Setup instructions for Hermes JMS
> FAQs
– Many sections
– Internal commands, JDBC, Private APIs, JMX, Etc
• Lots of info. In Users alias and Forum
Sun Confidential: Internal Only 8
9. Where to look further
• Open MQ project site – Community version
> https://mq.dev.java.net
> Don't forget to check the wiki at
– http://wiki.glassfish.java.net/Wiki.jsp?page=OpenMessageQueue
• Java MQ product – Commercial version
> http://sun.com/software/products/message_queue
• JMQ Product Manuals
> http://docs.sun.com/coll/1307.6
• Questions or other comments
> Community Mailing List: mailto:users@mq.dev.java.net
> User Forum: http://forum.java.sun.com/forum.jspa?forumID=711
Sun Confidential: Internal Only 9
11. Universal Message Service
• UMS is a very simple API
• It is implemented as a WebApp
> Deployed to any web container (GlassFish, Tomcat, GF
v3Prelude)
• Simple to configure
Sun Confidential: Internal Only 11
12. UMS – Simple Yet Powerful
• Simple API
Login (optional)
>
Send
>
Receive
>
Commit (optional)
>
Rollback (optional)
>
Close (optional)
>
• Supports HTTP or HTTPS
• For stateless clients (i.e. No login/logout) limited only by
throughput requirements
• Support many stateful clients per JMS connection
> Default is 100 stateful clients per connection
Sun Confidential: Internal Only 12
13. UMS Interface Types
• Simple messaging with HTTP URL query string
> Post /ums/simple?service=send&destination=myQueue
Hello, World!
• XML Document
<SOAP-ENV:Envelope xmlns:SOAP-ENV=quot;http://schemas.xmlsoap.org/soap/
envelope/quot;>
<SOAP-ENV:Header>
<ums:MessageHeader xmlns:ums=quot;https://mq.dev.java.net/umsquot;
ums:id=quot;1.0quot; ums:version=quot;1.0quot;>
<ums:Service
ums:service=quot;sendquot;
ums:destination=quot;myQueuequot;
ums:domain=quot;queuequot;
ums:sid=quot;7-LTgxMDczMTczNQ== quot;/>
</ums:MessageHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body><bodyvalue>Hello, World!</bodyvalue></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sun Confidential: Internal Only 13
14. Universal Message Service
• Why mess with JMS?
> JMS is a very rich and stable API
> JMS is designed for back-end messaging
• Goal is to allow any web enabled client to easily access
this back-end
> Provide a simpler API
> Scripting languages; Compiled languages
> Lower deployment overhead
– Reduce or eliminate deployment issues with client runtime
• Ubiquity of XML and URI query
Sun Confidential: Internal Only 14
15. Demo. Setup
• If you want to follow along with the demo you'll need
> MQ 4.3 – http://sun.com/software/products/message_queue/get.jsp
> GlassFish v3 Prelude –
http://sun.com/software/products/glassfishv3_prelude/get.jsp
> To run the Python sample, you'll need Python –
http://python.org/download/releases/2.5.2/
> The C# example only works in Windows operating environment.
Sun Confidential: Internal Only 15
16. Demonstration
• Start the MQ Broker
> Imqbrokerd -tty
• Deploy UMS.war to your web container
> Asadmin start-domain
> Asadmin deploy ums.war ($mq-home/mq/lib/ums/imqums.war)
• Point your browser to
> http://localhost:8080/ums/
• Select “Examples” link
• Try the Ajax Send and Receive
• Send w/Python; Receive w/C#
> python SendSOAPMsg.py -s localhost:8080 -f <filename>
> ReceiveSOAPMsg.exe -s localhost:8080
Sun Confidential: Internal Only 16
18. UMS Deployment
•••
JRuby C# Python AJAX
HTTP/S
Web Container – ex.
GlassFish v3 Prelude Web Container
JMS UMS Servlet
JMS
MQ Broker (Cluster)
MQ MQ MQ
Broker Broker Broker
Sun Confidential: Internal Only 18
19. UMS vs. JMS
• UMS is not a JMS replacement
• Use UMS for low volume clients
> Particularly useful with scripted applications
> Suitable for many clients, each at relatively low volume
– Client messaging measured in messages per minute
– Tens of Thousands of active clients, perhaps more
> No client runtime to distribute or manage
• Use JMS (Java or C) for traditional settings
> Highest throughput, supports (relatively) fewer clients
– Client messaging measured in hundreds to thousands per second
– Hundreds to thousands of clients
> Much richer control
> Runtime deployment must be managed
Sun Confidential: Internal Only 19
20. Where to look further
• Open MQ project site – Community version
> https://mq.dev.java.net
> Don't forget to check the wiki at
– http://wiki.glassfish.java.net/Wiki.jsp?page=OpenMessageQueue
• UMS details are in the WAR and online at
> https://mq.dev.java.net/4.3-content/ums/umsMain.html
• JMQ Product Manuals
> http://docs.sun.com/coll/1307.6
• Questions or other comments
> Community Mailing List: mailto:users@mq.dev.java.net
> User Forum: http://forum.java.sun.com/forum.jspa?forumID=711
Sun Confidential: Internal Only 20