|
Alan Kaminsky
|
|
•
|
|
Department of Computer Science
|
|
•
|
|
Rochester Institute of Technology
|
|
•
|
|
4486 +
2220 =
6706
|
|
Home Page
|
|
Distributed Systems
|
|
4005-730-01
|
|
Spring Quarter 2013
|
|
Course Page
|
4005-730 Distributed Systems
Java Message Service Example
Prof. Alan Kaminsky
Rochester Institute of Technology -- Department of Computer Science
Acknowledgment
Documentation
JMS Concepts
Message Queue Example
Publish-Subscribe Example
Acknowledgment
These Java Message Service (JMS) examples
are based on the example programs
in the Apache ActiveMQ distribution.
Documentation
JMS Concepts
- Message broker: The server for a MOM system
- Connection: Used to communicate with a message broker
- Connection factory: An object that creates connections for a particular message broker
- Session: A series of messaging operations
- The operations can be grouped into a transaction, or not
- Messages can be automatically acknowledged by the system, or manually acknowledged by the receiver
- Queue: For sending and receiving messages (MQ paradigm)
- Topic: For publishing and subscribing messages (pub-sub paradigm)
- Producer: Thing that sends a message to a queue (MQ) or publishes a message to a topic (pub-sub)
- Consumer: Thing that receives a message from a queue (MQ) or subscribes to receive messages from a topic (pub-sub)
- Message: An actual message; various types of content supported:
- BytesMessage: A stream of uninterpreted bytes
- MapMessage: A set of (name, value) pairs; names are type String, values are Java primitive types, Strings, or byte arrays
- ObjectMessage: A serializable object
- StreamMessage: A stream of Java primitive types, Strings, or byte arrays
- TextMessage: A String
Message Queue Example
Publish-Subscribe Example
|
Distributed Systems
|
|
4005-730-01
|
|
Spring Quarter 2013
|
|
Course Page
|
|
Alan Kaminsky
|
|
•
|
|
Department of Computer Science
|
|
•
|
|
Rochester Institute of Technology
|
|
•
|
|
4486 +
2220 =
6706
|
|
Home Page
|
Copyright © 2013 Alan Kaminsky.
All rights reserved.
Last updated 15-Apr-2013.
Please send comments to ark@cs.rit.edu.