Java Message Service JMS Markus Mller 24 09

  • Slides: 7
Download presentation
Java Message Service (JMS) Markus Möller 24. 09. 2020 Markus Möller 1

Java Message Service (JMS) Markus Möller 24. 09. 2020 Markus Möller 1

What is JMS? • API for sending and receiving messages • Interface specification by

What is JMS? • API for sending and receiving messages • Interface specification by SUN • Many implementations available (Open Source and proprietary software) • • Sun Java System Message Queue (proprietary but Freeware) • • Websphere/MQ (proprietary) • • Open. JMS (Open Source) • • … • Uses the database system Derby for storing the messages 24. 09. 2020 Markus Möller 2

The elements of JMS • JMS provider – The implementation of the JMS interface

The elements of JMS • JMS provider – The implementation of the JMS interface • JMS client – The application that produces / consumes messages • • JMS producer – Application that produces messages • • JMS consumer – Application that receives messages • JMS message – Object that contains the data • • Byte. Message – Contains a stream of bytes • • Text. Message – Contains a java. lang. String • • Stream. Message – Sending a stream of primitive types • • Map. Message – Contains a name-value-pair 24. 09. 2020 Markus Möller 3

The elements of JMS • JMS Queue – Container that holds the messages until

The elements of JMS • JMS Queue – Container that holds the messages until they have been read • JMS Topic – Container that forwards a message to one ore more subscriber • • Non-durable subscriber • • Durable subscriber 24. 09. 2020 Markus Möller 4

The structure of a Map. Message • The name(key)-value-pairs are always java. lang. String

The structure of a Map. Message • The name(key)-value-pairs are always java. lang. String • We use a set of properties for every Map. Message object • • TYPE (sms, css. Log, …) • • EVENTTIME (yyyy-mm-dd HH 24: MM: SS. MS) • • HOST • • USER • • TEXT (The text of e. g. the alarm message) • • . . . 24. 09. 2020 Markus Möller 5

The new Alarm-System using JMS 24. 09. 2020 Markus Möller 6

The new Alarm-System using JMS 24. 09. 2020 Markus Möller 6

A mail client IOC Any Source James Mailer Interconnection Server Open. JMS Server T

A mail client IOC Any Source James Mailer Interconnection Server Open. JMS Server T T COMMAND T ALARM LOG Filter Manager Jms 2 Ora SMS-Filter Any Filter Configuration Open. JMS Server 24. 09. 2020 T T SMS_CLIENT ANY TOPIC SMS-Receiver Any Receiver Markus Möller Any Destination 7