Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

how publisher/subscriber works  RSS feed

 
Ranch Hand
Posts: 1313
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In pub/sub model one messages delivered to all the subscribers. So i need to know how it happen internally? for example when publisher send a message to topic how it sends same message to all the subscribers?
does subscriber send same message multiple time or topic send same message multiple time to subscribers?
 
Sheriff
Posts: 24373
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The subscriber doesn't send any messages. Probably you meant to ask about the publisher?

Anyway, what exactly is your concern? Whether the subscribers all get the same message or whether they each get a copy of the message? If you're writing subscriber code, all you need to write is code to receive a published message. Who sends the message, or whether some other subscriber gets the same message (or a copy of it) aren't things which you have to take into account.
 
sam liya
Ranch Hand
Posts: 1313
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know when publisher send a one message , how all the subscribers get same message? since publisher send one message , one subscriber can consume it.
 
Paul Clapham
Sheriff
Posts: 24373
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously, then, they each get a copy of the same message.
 
Saloon Keeper
Posts: 2504
321
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sam liya wrote:I need to know when publisher send a one message , how all the subscribers get same message? since publisher send one message , one subscriber can consume it.


The publisher send one message to the broker.  The broker then forwards a copy of the message to all subscribers the consumers (subscribers) subscribed to the associated topic.
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!