Is there a way to avoid holding a reference to the printer? For example say I wanted an unknown number of printers to receive the broadcast and independently perform a print task.
Would this new change still be considered publish-subscribe pattern?
Yes! You may need to introduce Event Bus. It's like a huge highway, where publishers post events. Subscribers listen to that Event Bus, rather than Publishers.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a way to avoid holding a reference to the printer? For example say I wanted an unknown number of printers to receive the broadcast and independently perform a print task.
Would this new change still be considered publish-subscribe pattern?
Yes! You may need to introduce Event Bus. It's like a huge highway, where publishers post events. Subscribers listen to that Event Bus, rather than Publishers.