0% found this document useful (0 votes)
62 views2 pages

Apache Kafka

The document discusses two messaging models, point-to-point and publish-subscribe, supported by Java Message Service. It describes the models, including durable and non-durable options for publish-subscribe. The document also provides an overview of Kafka, a distributed messaging system, describing its pub-sub model, scalability, throughput, and organization of messages into topics.

Uploaded by

pravicheers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Apache Kafka

The document discusses two messaging models, point-to-point and publish-subscribe, supported by Java Message Service. It describes the models, including durable and non-durable options for publish-subscribe. The document also provides an overview of Kafka, a distributed messaging system, describing its pub-sub model, scalability, throughput, and organization of messages into topics.

Uploaded by

pravicheers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

JMS supports two kinds of Messaging models (Programming models) to support Asynchronous Messaging between

Heterogeneous Systems.

Point to Point Messaging Model and Publish Subscribe Messaging Model are the two different messaging paradigms
supported by Java Message Service (JMS). These messaging paradigms are programming models that support
asynchronous way of messaging between diverse systems.

 Point-To-Point Model(P2P Model)


 Publish-Subscribe Model(Pub/Sub Model)

Pub/Sub Messaging model is again divided into two categories as shown below:

Durable Messaging Model

Durable Model is also known as Persistent Messaging Model. In this model, Messages are stored in some kind
of store in JMS Server until they deliver to destination properly.

Non-Durable Messaging Model

Non-Durable Model is also known as Non-Persistent Messaging Model. In this model, Messages are not stored
in JMS Server.

Point-To-Point Model Publish-Subscribe Model


1. This model uses Queue as the channel. The 1. Pub-Sub model uses topic as the channel.
Producer sends message to the queue. Consumer pulls Publisher sends message to the topic.
message from the Queue. Consumer subscribe to a topic and gets all
the messages.

2. In this model Message is received by one consumer. 2. In this model message can be received by
We can configure any number of JMS Senders and JMS multiple consumers.
Receivers to a particular queue. However, any message 3. Publishers and subscribers have a timing
Should be delivered to one and only one Receiver. dependency. A client that subscribes to a
3. There is no timing dependency between JMS Sender topic can consume only messages
And JMS receiver. That means the JMS Receiver can published after the client has created a
consume the messages whether it is alive or not when subscription, and the subscriber must
JMS Sender sent that message. continue to be active in order for it to
4. In this model, Destination stores messages till it is consume messages.
consumed by Receiver.
KAFKA

Kafka is a distributed messaging system providing fast, highly scalable and redundant messaging through a pub-sub
model. Kafka, as a distributed system, runs in a cluster.

 It is designed as a distributed system which is very easy to scale out.


 It offers high throughput for both publishing and subscribing.
 It supports multi-subscribers and automatically balances the consumers during failure.
 It persist messages on disk

All Kafka messages are organized into topics. If you wish to send a message you send it to a specific topic and if you
wish to read a message you read it from a specific topic. A consumer pulls messages off of a Kafka topic
while producers push messages into a Kafka topic. Lastly, Kafka, as a distributed system, runs in a cluster. Each node
in the cluster is called a Kafka broker.

You might also like