JMS learning SUMMARY iii

Source: Internet
Author: User

JMS learning SUMMARY iii

JMS body, phase, and usage

  • JMS is a Standard Specification for generating, sending, and receiving messages.
  • Multi-Application system communication can be implemented based on JMS specifications
  • Supports secure topic message transmission, transactional messages, consistent messages, and persistent subscribers.
  • One scenario of JMS (factory production ==> spare parts ==> procurement)

 

Two communication types of JMS

  • Point-to-point (point-to-point), a message has only one receiver
  • Publish/subscribe (publish/subscribe). A message can have multiple recipients.
  • Use PTP messaging when every message you send must be processed successfully by one consumer.
  • Use pub/sub messaging when each message can be processed by zero, one, or multiple consumers.

JMS Message Body

  • Header: a standard field set. Both the client and service provider are used to identify and route messages.
  • Property: Provides
    Bean content set <type> property and get
    <Type> property, optional support from service providers
  • Body: Message content. Different message interfaces are specific to different content types.

Different JMS Message Types

Although the JMS type is different, it is implemented by the message interface.

  • Streammessage: transmits the content of the Java-based basic stream.
  • Mapmessage: a set of key-value content. The key is string and the value is the basic Java type.
  • Textmessage: A large string
  • Objectmessage: content that supports serializable
  • Bytesmessage: byte stream content
  • Xmlmessage: Extended textmessage, but it is much more convenient with the self-description operation.

Is the message received? Still not received!

The message validation mode is used to identify whether a message is received or not, and the message mode is not differentiated in transaction mode.

Five message validation Modes

  • Auto_acknowledge: Automatic confirmation mode. If only the receiver receives the response, the exception is still normal.
  • In client_acknowledge client validation mode, the receiver must call the acknowledge method. In other cases, it is deemed that the method is not received. Batch confirmation is required. The last or one message calls the acknowledge method.
  • Dups_ OK _acknowledge allows repeated validation Modes
  • No_acknowledge unconfirmed Mode
  • Multicast_no_acknowledge: the unconfirmed Mode Under the IP Group Broadcasting

 

References

  • Http://activemq.apache.org/
  • Http://activemq.apache.org/version-5-getting-started.html
  • Http://activemq.apache.org/examples.html
  • Http://www.oracle.com/technetwork/java/jms/index.html
  • Http://www.blogjava.net/baoyaer/articles/101077.aspx? Opt = Admin

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.