Also known as Pub/Sub, this messaging pattern allows customers, known as subscribers, to asynchronously receive events generated by a producer, known as a publisher. Pub/Sub is a well-known pattern used in distributed systems to asynchronously communicate different services interested in learning specific information about a particular service.
In Go, we can use the concurrency primitives of the language, such as channels and goroutines, to implement this pattern.
Let me show you how.
=== Relevant Links
■ Examples: https://github.com/MarioCarrion/video...
== All Go/Golang Playlists
■ Learning Concurrency Patterns in Go/Golang: • Learning Go/Golang Concurrency Patterns
■ Software Architecture in Go/Golang: • Software Architecture and System Desi...
■ Building Microservices in Go/Golang: • Building Microservices in Golang/Go
■ Go/Golang Tools and Packages: • Golang/Go Tools and Packages
■ Learning Go/Golang: • Learning Go/Golang
■ Learning Relational Databases in Go/Golang: • Learning Go/Golang: Relational Databases
■ Testing in Go/Golang: • Testing in Golang/Go
00:00 - Intro to Golang Publisher Subscriber Concurrency Pattern
00:08 - What is the Publisher/Subscriber Concurrency Pattern?
00:52 - Creating the PubSub Golang generic type
02:03 - Implementing the Subscribe method
03:19 - Implementing the Publish method
04:49 - Putting it all together
08:13 - Conclusion of Golang Publisher Subscriber Concurrency Pattern
=== Who am I?
Hello 👋🏼! My name is Mario, and I am a Hands-on Software Architect and Lead Backend Engineer with decades of professional experience building all kinds of software, such as on-premise Automation Systems, Linux Accessibility Desktop Applications, Cloud Governance and Compliance Systems, and Distributed Cloud-based Advertising Systems.
The content I produce includes what I've learned while working for small startups and large companies and the processes I've followed for successfully delivering complex enterprise systems from start to end.
Subscribe if you like Software Development, Software Architecture, and Systems Design, and of course, Go!
Keep it up. Don't give up!
#golang #tutorial #concurrency
=== Follow us on Instagram for our family adventures
■ / ruby_carrion
=== Our affiliate links below
■ Technical/Non-technical Books found on Amazon: https://www.amazon.com/shop/rubycarri...
■ Amazon Storefront: https://www.amazon.com/shop/rubycarrion
■ Shop LTK page: https://www.shopltk.com/explore/RubyC...
DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost. I appreciate your support! 💖
Watch video Learning Golang: Concurrency Pattern Publisher / Subscriber online without registration, duration hours minute second in high quality. This video was added by user Mario Carrion 06 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,18 once and liked it 10 people.