Prev Next

Integration / ActiveMQ Interview Questions Basics

What are the types of messaging models in JMS?

JMS defines two core messaging models that determine how a message travels from sender to receiver.

  • Point-to-Point - messages are placed on a queue and delivered to exactly one consumer.
  • Publish-Subscribe - messages are sent to a topic and delivered to every active subscriber.

Both models share the same JMS API, differing only in the destination type used.

In practice, the model is chosen by which destination interface the application uses: Queue/QueueSender/QueueReceiver for point-to-point, or Topic/TopicPublisher/TopicSubscriber for publish-subscribe. Since JMS 1.1, a unified domain lets the same Session and generic Destination interfaces work with either model, so code does not have to be written twice for queue-based and topic-based messaging.

In point-to-point, how many consumers receive a given message?
Which destination type is used for publish-subscribe?

More Related questions...

Show more question and Answers...


Comments & Discussions