SlideShare a Scribd company logo
Spring Boot
Microservices
Beginner	to	Guru
Introduction	to	JMS
What is JMS?
• JMS - Java Messaging Service
• JMS is a Java API which allows a Java Application to send a message to another application
• Generally the other application is a Java application - but not always!
• JMS is a standard Java API which requires an underlying implementation to be provided
• Much like JPA - where JPA is the API standard, and Hibernate is the implementation
• JMS is highly scalable and allows you to loosely couple applications using asynchronous
messaging
JMS Implementations
• Amazon SQS
• Apache ActiveMQ
• JBoss Messaging
• IBM MQ - (Closed source / paid)
• OracleAQ - (Closed Source / paid)
• RabbitMQ
• Many many more!
Why Use JMS over REST?
• JMS is a true messaging service
• Asynchronous - send and forget!
• Greater through put - the HTTP protocol is slow comparatively
• JMS protocols are VERY performant
• Flexibility in message delivery - Deliver to one or many consumers
• Security - JMS has a very robust security
• Reliability - Can guarantee message delivery
Types of Messaging
• Point to Point
• Message is queued and delivered to one consumer
• Can have multiple consumers - but message will be delivered only ONCE
• Consumers connect to a queue
• Publish / Subscribe
• Message is delivered to one or more subscribers
• Subscribers will subscribe to a topic, then receive a copy of all messages sent to the topic
Point to Point
Publish / Subscribe
Key Terms
• JMS Provider - JMS Implementation
• JMS Client - Application which sends or receives messages from the JMS provider
• JMS Producer or Publisher - JMS Client which sends messages
• JMS Consumer or Subscriber - JMS Client which receives messages
• JMS Message - the entity of data sent (details next slide!)
• JMS Queue - Queue for point to point messages. Often, not always, FIFO
• JMS Topic - Similar to a queue - but for publish and subscribe
JMS Message
• A JMS Message contains three parts:
• Header - contains meta data about the message
• Properties - Message properties are in 3 sections
• Application - From Java Application sending message
• Provider - Used by the JMS provider and are implementation specific
• Standard Properties - Defined by the JMS API - Might not be supported by the provider
• Payload - the message itself
JMS Header Properties
• JMSCorrelationID - String value, typically a UUID. Set by application, often used to trace a
message through multiple consumers
• JMSExpires - Long - zero, does not expire. Else, time when message will expire and be removed
from the queue
• JMSMessageId - String value, typically set by the JMS Provider
• JMSPriority - Integer - Priority of the message
• JMSTimestamp - Long - Time message was sent
JMS Header Properties (Cont…)
• JMSType - String - The type of the message
• JMSReplyTo - Queue or topic which sender is expecting replies
• JMSRedelivery - Boolean - Has message been re-delivered?
• JMSDeliveryMode - Integer, set by JMS Provider for delivery mode
• Persistent (Default) - JMS Provider should make best effort to deliver message
• Non-Persistent - Occasional message lost is acceptable
JMS Message Properties
• JSMXUserId - (String) User Id sending message. Set by JMS Provider.
• JMSXAppID - (String) Id of the application sending the message. Set by JMS Provider.
• JMSXDeliveryCount - (Int) Number of delivery attempts. Set by JMS Provider.
• JMSXGroupID - (String) The message group which the message is part of. Set by Client.
• JMSXGroupSeq - (Int) Sequence number of message in group. Set by Client.
• JMSXProducerTDIX - (String) Transaction id when message was produced. Set by JMS Producer.
JMS Message Properties (Cont…)
• JSMXConsumerTXID - (String) Transaction Id when the message was consumed. Set by JMS
Provider.
• JMSXRcvTimestamp - (Long) Timestamp when message delivered to consumer. Set by JMS
Provider.
• JMSXState - (Int) State of the JMS Message. Set by JMS Provider.
JMS Custom Properties
• The JMS Client can set custom properties on messages
• Properties are set as key / value pairs (String, value)
• Values must be one of:
• String, boolean, byte, double, float, int, short, long or Object
JMS Provider Properties
• The JMS Client can also set JMS Provider Specific properties
• These properties are set as JMS_<provider name>
• JMS Provider specific properties allow the client to utilize features specific to the JMS Provider
• Refer to documentation of your selected JMS Provider for details
JMS Message Types
• Message - Just a message, no payload. Often used to notify about events
• BytesMessage - Payload is an array of bytes
• TextMessage - Message is stored as a string. (Often JSON or XML)
• StreamMessage - sequence of Java primitives
• MapMessage - message is name value pairs
• ObjectMessage - Message is a serialized Java object
Which Message Type to Use?
• JMS 1.0 was originally released in 1998 - Initial focus was on Java to Java messaging
• Since 1998 Messaging and technology has grown and evolved beyond the Java ecosystem
• JMS TextMessages with JSON or XML payloads are currently favored
• Decoupled from Java - can be consumed by any technology
• Not uncommon to‘bridge’to non-java providers
• Makes migration to a non-JMS provider less painful
• Important since messaging is becoming more and more generic and abstracted
Introduction tojms

More Related Content

What's hot

JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
Vadym Lotar
 
test
testtest
test
techweb08
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1
von gosling
 
Differences between JMS and AMQP
Differences between JMS and AMQPDifferences between JMS and AMQP
Differences between JMS and AMQP
◄ vaquar khan ► ★✔
 
Apache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in actionApache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in action
dejanb
 
RabbitMQ - message broker
RabbitMQ - message brokerRabbitMQ - message broker
RabbitMQ - message broker
Vít Kutný
 
Jms
JmsJms
Java Messaging Service
Java Messaging ServiceJava Messaging Service
Java Messaging Service
Dilip Prajapati
 
Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?
Mikalai Alimenkou
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
Ryan Cuprak
 
Java Message Service
Java Message ServiceJava Message Service
Java Message Service
AMIT YADAV
 
Jms
JmsJms
Spring JMS
Spring JMSSpring JMS
Spring JMS
Emprovise
 
JMS-Java Message Service
JMS-Java Message ServiceJMS-Java Message Service
JMS-Java Message Service
Kasun Madusanke
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
Peter R. Egli
 

What's hot (15)

JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 
test
testtest
test
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1
 
Differences between JMS and AMQP
Differences between JMS and AMQPDifferences between JMS and AMQP
Differences between JMS and AMQP
 
Apache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in actionApache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in action
 
RabbitMQ - message broker
RabbitMQ - message brokerRabbitMQ - message broker
RabbitMQ - message broker
 
Jms
JmsJms
Jms
 
Java Messaging Service
Java Messaging ServiceJava Messaging Service
Java Messaging Service
 
Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Java Message Service
Java Message ServiceJava Message Service
Java Message Service
 
Jms
JmsJms
Jms
 
Spring JMS
Spring JMSSpring JMS
Spring JMS
 
JMS-Java Message Service
JMS-Java Message ServiceJMS-Java Message Service
JMS-Java Message Service
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
 

Similar to Introduction tojms

Introduction java messaging services
Introduction java messaging servicesIntroduction java messaging services
Introduction java messaging services
Son Nguyen
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
Rupesh Sinha
 
Jms using j boss
Jms using j bossJms using j boss
Jms using j boss
Skillwise Group
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
test
testtest
test
techweb08
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
EosSoftware
 
Messaging in Java
Messaging in JavaMessaging in Java
Messaging in Java
Dmitry Buzdin
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
Vasanthii Chowdary
 
Message Oriented Middleware
Message Oriented MiddlewareMessage Oriented Middleware
Message Oriented Middleware
Manuswath K.B
 
Weblogic - Introduction to configure JMS
Weblogic  - Introduction to configure JMSWeblogic  - Introduction to configure JMS
Weblogic - Introduction to configure JMS
Vibrant Technologies & Computers
 
Jms
JmsJms
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache Camel
Kapil Kumar
 
Spring integration
Spring integrationSpring integration
Spring integration
Oliver Gierke
 
1. Core Features of Apache RocketMQ
1. Core Features of Apache RocketMQ1. Core Features of Apache RocketMQ
1. Core Features of Apache RocketMQ
振东 刘
 
Jms intro
Jms introJms intro
Jms intro
Manav Prasad
 

Similar to Introduction tojms (20)

Introduction java messaging services
Introduction java messaging servicesIntroduction java messaging services
Introduction java messaging services
 
Mule JMS Transport
Mule JMS TransportMule JMS Transport
Mule JMS Transport
 
Jms using j boss
Jms using j bossJms using j boss
Jms using j boss
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
 
Messaging in Java
Messaging in JavaMessaging in Java
Messaging in Java
 
M messaging 1
M messaging 1M messaging 1
M messaging 1
 
Message Oriented Middleware
Message Oriented MiddlewareMessage Oriented Middleware
Message Oriented Middleware
 
Weblogic - Introduction to configure JMS
Weblogic  - Introduction to configure JMSWeblogic  - Introduction to configure JMS
Weblogic - Introduction to configure JMS
 
Jms
JmsJms
Jms
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache Camel
 
Spring integration
Spring integrationSpring integration
Spring integration
 
1. Core Features of Apache RocketMQ
1. Core Features of Apache RocketMQ1. Core Features of Apache RocketMQ
1. Core Features of Apache RocketMQ
 
Jms intro
Jms introJms intro
Jms intro
 

Recently uploaded

1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
Kamal Acharya
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Balvir Singh
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Levelised Cost of Hydrogen (LCOH) Calculator Manual
Levelised Cost of Hydrogen  (LCOH) Calculator ManualLevelised Cost of Hydrogen  (LCOH) Calculator Manual
Levelised Cost of Hydrogen (LCOH) Calculator Manual
Massimo Talia
 
Presentation on Food Delivery Systems
Presentation on Food Delivery SystemsPresentation on Food Delivery Systems
Presentation on Food Delivery Systems
Abdullah Al Noman
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
felixwold
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
snaprevwdev
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
OKORIE1
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
ijseajournal
 
This study Examines the Effectiveness of Talent Procurement through the Imple...
This study Examines the Effectiveness of Talent Procurement through the Imple...This study Examines the Effectiveness of Talent Procurement through the Imple...
This study Examines the Effectiveness of Talent Procurement through the Imple...
DharmaBanothu
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
Kamal Acharya
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
wafawafa52
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 

Recently uploaded (20)

1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Levelised Cost of Hydrogen (LCOH) Calculator Manual
Levelised Cost of Hydrogen  (LCOH) Calculator ManualLevelised Cost of Hydrogen  (LCOH) Calculator Manual
Levelised Cost of Hydrogen (LCOH) Calculator Manual
 
Presentation on Food Delivery Systems
Presentation on Food Delivery SystemsPresentation on Food Delivery Systems
Presentation on Food Delivery Systems
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
 
openshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoinopenshift technical overview - Flow of openshift containerisatoin
openshift technical overview - Flow of openshift containerisatoin
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
 
This study Examines the Effectiveness of Talent Procurement through the Imple...
This study Examines the Effectiveness of Talent Procurement through the Imple...This study Examines the Effectiveness of Talent Procurement through the Imple...
This study Examines the Effectiveness of Talent Procurement through the Imple...
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 

Introduction tojms

  • 2. What is JMS? • JMS - Java Messaging Service • JMS is a Java API which allows a Java Application to send a message to another application • Generally the other application is a Java application - but not always! • JMS is a standard Java API which requires an underlying implementation to be provided • Much like JPA - where JPA is the API standard, and Hibernate is the implementation • JMS is highly scalable and allows you to loosely couple applications using asynchronous messaging
  • 3. JMS Implementations • Amazon SQS • Apache ActiveMQ • JBoss Messaging • IBM MQ - (Closed source / paid) • OracleAQ - (Closed Source / paid) • RabbitMQ • Many many more!
  • 4. Why Use JMS over REST? • JMS is a true messaging service • Asynchronous - send and forget! • Greater through put - the HTTP protocol is slow comparatively • JMS protocols are VERY performant • Flexibility in message delivery - Deliver to one or many consumers • Security - JMS has a very robust security • Reliability - Can guarantee message delivery
  • 5. Types of Messaging • Point to Point • Message is queued and delivered to one consumer • Can have multiple consumers - but message will be delivered only ONCE • Consumers connect to a queue • Publish / Subscribe • Message is delivered to one or more subscribers • Subscribers will subscribe to a topic, then receive a copy of all messages sent to the topic
  • 8. Key Terms • JMS Provider - JMS Implementation • JMS Client - Application which sends or receives messages from the JMS provider • JMS Producer or Publisher - JMS Client which sends messages • JMS Consumer or Subscriber - JMS Client which receives messages • JMS Message - the entity of data sent (details next slide!) • JMS Queue - Queue for point to point messages. Often, not always, FIFO • JMS Topic - Similar to a queue - but for publish and subscribe
  • 9. JMS Message • A JMS Message contains three parts: • Header - contains meta data about the message • Properties - Message properties are in 3 sections • Application - From Java Application sending message • Provider - Used by the JMS provider and are implementation specific • Standard Properties - Defined by the JMS API - Might not be supported by the provider • Payload - the message itself
  • 10. JMS Header Properties • JMSCorrelationID - String value, typically a UUID. Set by application, often used to trace a message through multiple consumers • JMSExpires - Long - zero, does not expire. Else, time when message will expire and be removed from the queue • JMSMessageId - String value, typically set by the JMS Provider • JMSPriority - Integer - Priority of the message • JMSTimestamp - Long - Time message was sent
  • 11. JMS Header Properties (Cont…) • JMSType - String - The type of the message • JMSReplyTo - Queue or topic which sender is expecting replies • JMSRedelivery - Boolean - Has message been re-delivered? • JMSDeliveryMode - Integer, set by JMS Provider for delivery mode • Persistent (Default) - JMS Provider should make best effort to deliver message • Non-Persistent - Occasional message lost is acceptable
  • 12. JMS Message Properties • JSMXUserId - (String) User Id sending message. Set by JMS Provider. • JMSXAppID - (String) Id of the application sending the message. Set by JMS Provider. • JMSXDeliveryCount - (Int) Number of delivery attempts. Set by JMS Provider. • JMSXGroupID - (String) The message group which the message is part of. Set by Client. • JMSXGroupSeq - (Int) Sequence number of message in group. Set by Client. • JMSXProducerTDIX - (String) Transaction id when message was produced. Set by JMS Producer.
  • 13. JMS Message Properties (Cont…) • JSMXConsumerTXID - (String) Transaction Id when the message was consumed. Set by JMS Provider. • JMSXRcvTimestamp - (Long) Timestamp when message delivered to consumer. Set by JMS Provider. • JMSXState - (Int) State of the JMS Message. Set by JMS Provider.
  • 14. JMS Custom Properties • The JMS Client can set custom properties on messages • Properties are set as key / value pairs (String, value) • Values must be one of: • String, boolean, byte, double, float, int, short, long or Object
  • 15. JMS Provider Properties • The JMS Client can also set JMS Provider Specific properties • These properties are set as JMS_<provider name> • JMS Provider specific properties allow the client to utilize features specific to the JMS Provider • Refer to documentation of your selected JMS Provider for details
  • 16. JMS Message Types • Message - Just a message, no payload. Often used to notify about events • BytesMessage - Payload is an array of bytes • TextMessage - Message is stored as a string. (Often JSON or XML) • StreamMessage - sequence of Java primitives • MapMessage - message is name value pairs • ObjectMessage - Message is a serialized Java object
  • 17. Which Message Type to Use? • JMS 1.0 was originally released in 1998 - Initial focus was on Java to Java messaging • Since 1998 Messaging and technology has grown and evolved beyond the Java ecosystem • JMS TextMessages with JSON or XML payloads are currently favored • Decoupled from Java - can be consumed by any technology • Not uncommon to‘bridge’to non-java providers • Makes migration to a non-JMS provider less painful • Important since messaging is becoming more and more generic and abstracted