10 Şubat 2010 Çarşamba

OpenJms

in this post, i note down some links related to openjms and i try to give a summary.. here is my prev post on the issue: http://hilaltarakci.blogspot.com/2010/02/intro-to-jms.html

http://www.devx.com/Java/Article/20903
here is a presentation about openjms: http://www.oreillynet.com/pub/d/834
a summary from the presentation by Jim Alateras:
  • two messaging models: Queues(point to point), Topics(publish and subscribe)
  • two message delivery modes: persistent (provider attempts to deliver the message at most once to the consumer. If the consumer is unavailable, provider persist the message and deliver it when the consumer is reactivated. ), non-persistent ( provider attempts to deliver non-persistent messages at most once. If the consumer is unavailable or inactive, then consumer will never receive the message. Non persistent messages should only be used if the subscribers can tolerate lost messages.)
  • five message types: text, byte, object map and stream. most applications use xml.
  • syncronous (consumers pull messages from the provider by calling receive ) & asyncronous (if consumer registers a listener, provider push messages to consumer ) message consumption
  • selectors, used by consumers to selectively process messages
  • 10 priority levels 1 being the lowest and 10 being the highest. Publishers assign priority levels to messages, which effect the order that they are queued by provider.
  • QueueBrowser, specific to queue destinations and is used to browse messages on a queue.
  • two transaction modes Local( use the chained transaction model and applied to transacted sessions) & Distributed (use 2 phase commit protocol and are defined by a set of XA interfaces. XA interfaces are part of the advanced server facility)

Queues:

  • Senders publish messages to queue and receivers consumer messages of queue.More than one sender or receiver can be attached to queue.
  • Messages on a queue are delivered to only one consumer and JMS does not define delivery semantics when more than one subscriber is attached to the queue. a message is only sent to one of the registered subscribers.
  • Priority effects the order that messages are queued for delivery. Higher priority messages are queued for delivery before lower priority messages
  • Non-persistent messages delivered at most once.
  • Persistent messages delivered exactly once.

Topics:

  • Publishers publish messages and subscribers consume them. A topic with once subscriber and one publisher acts similar to a queue.
  • When you have multiple publishers and subscribers ,the publishers send messages to the provider, who queues them for delivery and then each of the subscribers receive a copy of each published message.
  • As for Queues priority effects the order that messages queued for delivery and selectors effect the order that messages are consumed.
  • Similar to queues persistent and non-persistent delivery

Hiç yorum yok:

Yorum Gönder