Saturday, February 7, 2009

SCEA1.5 - Messaging

Java Messaging Service (JMS):
JMS provides a common way for Java programs to create, send, receive and read an enterprise messaging system’s messages.
JMS defines a set of message interfaces.
JMS provides client interfaces for point-to-point (PTP) and publish-subscribe systems.
PTPbuilt around the concept of message queueseach message is addressed to a specific queue; clients get messages from the queue(s) created tohold their messages

Publish-Subscribe:
Publishers address messages to a node or addressSystem distributes the messages arriving from a publisher to the subscribers of that publisher
Nothing prevents a JMS application from combining PTP and publish-subscribe but JMS focuses on applications that use one approach or the other.

Asynchronous messaging:
Loose coupling between sender and receiver
Does not block sender
Network does not need to be available, messages can be queuedLeast demanding on comm. mechanisms
Good for publish-subscribe

Synchronous messaging:
Tight coupling between sender and receiver
Blocks sender until receiver is finished processing
Network must be availableMore demanding on comm.
Mechanisms Good for transaction processing, Fail-safe comm.
Coping with error situations

JMS does NOT include the following:
Load balancing/fault tolerance
Error/advisory notification
AdministrationSecurity
Wire protocol
Message Type Repository