Topic instances can be perceived as a street advertising columns. Components interested in some
sort of messages will subscribe to appropriate Topic instance in MessageBus that controls message
flow between message publishers and listeners.
For example, we might have some components interested in receiving beaver photo updates and components
interested in receiving wombat photo updates. For this situation, we would create two Topics:
caseobject BeaverPhotosTopic extends Topic {
val name = "beaver-photos"
}
caseobject WombatPhotosTopic extends Topic {
val name = "wombat-photos"
}
All messages sent to BeaverPhotosTopic would be received only by components subscribed to BeaverPhotosTopic.
All messages sent to WombatPhotosTopic would be received only by components subscribed to WombatPhotosTopic.
Topic instances can be perceived as a street advertising columns. Components interested in some sort of messages will subscribe to appropriate
Topic
instance inMessageBus
that controls message flow between message publishers and listeners.For example, we might have some components interested in receiving beaver photo updates and components interested in receiving wombat photo updates. For this situation, we would create two
Topics
:All messages sent to
BeaverPhotosTopic
would be received only by components subscribed toBeaverPhotosTopic
. All messages sent toWombatPhotosTopic
would be received only by components subscribed toWombatPhotosTopic
.