13 - JMS. Asynchronous communication in Java - Michal Szynkiewicz - IT Event 2013 (5)
This talk will give an introduction to Java Message Service. It will describe communication schemes supported by the JMS, give examples of JMS use cases, show how to use JMS with Spring Framework.
It will mention key features incoming in JMS 2.0 and give a brief overview of some alternatives to JMS protocol.
Michał Szynkiewicz
http://itevent.if.ua/lecture/jms-asynchronous-communication-java
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
13 - jms. asynchronous communication in java - michal szynkiewicz - it event 2013 (5)
1. JMS
Asynchronous communication in Java
Michał Szynkiewicz
Examples: https://github.com/michalszynkiewicz/jms-examples
Email: michal.l.szynkiewicz@gmail.com
26. ● Choosing a subset of all messages
● SQL-like syntax
● Can only use properties and headers
E.g. “JMSPriority = 6 and
myProperty='someValue'”
Message selectors
29. Message acknowledgement
● Message are kept on server until message
acknowledgment comes
●Acknowledgement modes:
● AUTO — automatic
● CLIENT — manual (message.acknowledge())
● DUPS_OK — batch, may result in duplicates
30. ● Messages that failed to be processed, can be
redelivered
● Can be immediate or delayed
● After maximum number of redeliveries
message ends up in DLQ
Message redelivery
33. On specJMS test it was able to handle 8M per
second.
It uses disk storage for persistence.
Source: http://planet.jboss.org/post/8_2_million_messages_second_with_specjms
How fast can it be?
On example of HornetQ
35. Not much :)
● Simplified API
● Asynchronous sending (your code doesn't have
to wait for JMS provider)
● Delivery delay
What's new in JMS 2.0
36. ●AMQP
+ cross-platform, full-feature, widely used
- protocol still evolving, not backward compatible. Only
few providers implement current version.
●STOMP
+ via HTTP, widely implemented, lightweight
- protocol doesn't describe destination types, etc
●MQTT
+ extremely lightweight, used on mobile devices
- no queue (topic only), no message properties (only
headers)
(Some) other messaging standards