JMS message data persistence and ActiveMQ

  • Understanding JMS
    JMS is the Java Message Service (Java message service), is the java platform API on message-oriented middleware (MOM) is. Two applications for distributed systems or applications, messaging, asynchronous message processing. That inter-application communication via JMS service for message forwarding. Asynchronous inter-application message handling application may be decoupled.
    There JMS messages asynchronously, decoupling between programs, news and reliable advantage.
  • JMS message model
    Queue Point (Point to Point )
    Queue Queue is a point of consumption, the sender sends a message, there is only a consumer can consume the message. A message producer will send messages to the message queue (Queue) in. Message queues can be long-lasting, ensure messaging service failure is still able to deliver the message.
    Features:
    1) Each message has only one customer (Customer), once the message is consumed, not in the message queue (Queue) a.
    2) The message sender and receiver do not have time-dependent, the message sender just sends a message, the message regardless of whether consumers are receiving messages.
    3) After receiving the message is a message, sends a message acknowledgment (ACK) message to the notification queue (Queue).
    Queue model diagram:
    JMS message data persistence and ActiveMQ
    Publish / Subscribe (Publish / Subscribe)
    news publisher announced that message to all recipients by theme (Topic), news publishers and subscribers are irrelevant to each other. Theme (Topic) is mainly used to store and deliver the message.
    Publish / subscribe model, applications have Topic, publisher (Publish), subscribers (Subscribe) components.
    Features:
    1) Each message can have multiple consumer subscribers.
    2) The publisher and subscribers without time-dependent manner. A topic (Topic) subscribers, you must first create a message to the consumer after the publisher of a subscriber, and consumer news, the subscriber must keep running.
    3). Persistable subscription.
    Topic model diagram:
    JMS message data persistence and ActiveMQ

  • Message data persistence

Guess you like

Origin blog.51cto.com/10874766/2444110