What is the difference between pub/sub and Point to Point i.e. p2p. ?

Answer Posted / maanya shree

pub/sub ? Publish/Subscriber

Publish/Subscriber can have multiple Publisher who publish message and multiple Subscriber who subscribe the messages. This is like watching TV multiple channel and multiple users .

One message can have more then one subscriber.

All the publish messages have the header and subscriber consume the message based on the header.

In JMS we say Topic.

P2p ? Point to point

One message have only one subscriber. Multiple publisher can send multiple messages to the Queue but each message has only one subscriber.

What is the different between JMS and RPC? view answer

RPC : Remote procedure Call

In RPC the method invoker waits for the method to finish execution and return the control back to the invoker. Thus it is completely synchronous in nature.

JMS : Java Messaging System

While in JMS the message sender just sends the message to the destination and continues it's own processing. The sender does not wait for the receiver to respond. This is asynchronous behavior.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the advantage of persistent message delivery compared to nonpersistent delivery?

452


Why jms is used in java?

468


What is a stream message?

471


What is difference between queue and topic in jms?

452


How to Allowe messages to expire ?

948






What is the difference between Jms and Jvt ?

531


What is a remote jms provider?

504


What is wire level protocol?

468


Explain Asynchronous Message Consumption in JMS?

962


What are all the features of JMS API in J2EE platform?

498


How does jms listener work?

490


What is the purpose of jms?

506


What is message listener?

456


What is the best message queue?

477


Is kafka a jms?

469