Sunday, July 26, 2009

Difference between Queue and Topic

A point-to-point (PTP) product or application is built around the concept of message Queues senders and receivers. Each message is addressed to a specific queue and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire.

In a publish/subscribe (pub/sub) product or application clients address messages to a Topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic's multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.

Labels:

Tuesday, July 21, 2009

How to Fix Memory Leaks in Java