MulticastPublisherReader
is both a UDP multicast publisher and a TCP socket reader. The client of the MulticastPublisherReader
takes a ChannelReaderConsumer
as a constructor parameter, and when it receives TCP requests it relays the requests to the ChannelReaderConsumer
. Why? Because the MulticastPublisherReader
only knows how to publish two things:publisherAddress
instance variable. This TCP address is how other services can tell it what to publish, which leads to...ChannelPublisher
protocol method void send(final RawMessage message)
. These are received via TCP requests, for publishing of the information in the RawMessage
. One example of such is registration by services that want their availability know to other services.