Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

JMS: An infrastructure for XML-based business-to-business communication

Learn how the Java Messaging Service can provide a flexible, reliable, and secure means of exchanging XML-based transactions

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 3 of 7

What is the immediate benefit of this approach? The sales department is guaranteed to receive all the rate-change information, regardless of any problems with the physical communication between it and the datacenter. Moreover, the long-term benefits are even more profound. It's easy to imagine that, several months later, another department will determine that it too needs this rate-plan information in order to create a periodic report to management. After that, a marketing group may decide to provide new rate plans on a secured extranet site for the company's partners. Each of these new applications will perform radically different actions based on the published information, but they can obtain it by simply subscribing to the original topic and receiving XML messages. Note that the original datacenter application doesn't need to change to support these new uses. In fact, it doesn't even to be aware of the new applications or how they intend to use the data. Separating the event of sending a message from the semantics of processing it allows the message to be used in a multitude of ways unknown or unimagined at the time the publishing application is designed.

Key JMS features

A number of key characteristics of JMS make it a good fit for B2B communication, enterprise application integration, and a score of uses in between. Let's take a look at these important features.

Flexible programming model

JMS supports two primary messaging paradigms: publish/subscribe, or pub/sub, and point-to-point. Pub/sub messaging is a one-to-many publishing paradigm, in which client applications publish messages to topics, to which other interested clients in turn subscribe. All subscribed clients will receive each message (subject to quality of service, connectivity, and selection factors). Point-to-point messaging, on the other hand, provides a traditional queuing mechanism in which a client application sends messages through a queue to (typically) one receiving client that obtains the messages sequentially.

Both paradigms are articulated through nearly identical programming models, wherein quality of service, security, acknowledgement modes (indicating how and when the messaging system is informed that a client has received a message), and the like are specified in a manner independent of other properties and the messaging paradigm employed.

Resilience

Java messaging services that fully implement the JMS specification provide multiple forms of resilience for the applications they service. For example, a sender can indicate that a given message should persist within a broker-managed data store until all subscribed recipients receive the message. Subscriptions can also be made durable, meaning that a client application will automatically receive messages that are sent to the subscribed topics whenever the client attaches to the message broker -- including any persistent messages that may have been sent while the client was offline. The Java messaging service manages the details of the persistence underlying these capabilities. The JMS specification itself does not prescribe how persistence should be implemented -- the implementation design is left to the provider of a Java messaging service.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • Other JavaWorld articles related to JMS