Allow your applications to access real-time data changes
Sign in to follow topics
MongoDB & Node.js: Change Streams & Triggers (Part 4 of 4)When you need to react immediately to changes in your MongoDB database, change streams and triggers can help you make that happen. In part four of this quick start tutorial for beginners, Lauren Schaefer explains three ways to monitor change streams in a Node.js script: using EventEmitter's on(), using ChangeStream's hasNext(), and using Node's Stream API. She also explains how to create triggers in MongoDB Atlas. Chapters: 00:00 Intro 00:57 Change Streams 03:52 Monitoring Change Streams Using EventEmitter's on() 12:21 Monitoring Change Streams Using ChangStream's hasNext() 16:37 Monitoring Change Streams Using the Stream API 19:57 Resuming Change Streams 21:43 Triggers 27:16 Wrapping Up Links Lauren mentions in the video: Lauren's blog post: Change Streams & Triggers with Node.js Tutorial https://developer.mongodb.com/quickstart/nodejs-change-streams-triggers Lauren's GitHub repo with the code from this video https://github.com/mongodb-developer/nodejs-quickstart/blob/master/changeStreams.js Node.js & MongoDB Starter Template File https://github.com/mongodb-developer/nodejs-quickstart/blob/master/template.js Other videos in this tutorial series: Part 1: https://youtu.be/fbYExfeFsI0 Part 2: https://youtu.be/iz37fDe1XoM Part 3: https://youtu.be/bdS03tgD2QQ Connect with Lauren: Twitter: https://twitter.com/lauren_schaefer TikTok: https://tiktok.com/@lauren_schaefer Linkedin: https://www.linkedin.com/in/laurenjan... MongoDB Community: https://developer.mongodb.com/community/forums/t/hey-friends-im-lauren/168/ Subscribe to MongoDB ►►► https://bit.ly/3bpg1Z1 Connect with MongoDB: Website: https://bit.ly/2LjtNBZ Twitter: https://bit.ly/3fH87gR Facebook: https://bit.ly/3fEaIsd Linkedin: https://bit.ly/2SY9w90 Instagram: https://bit.ly/3bn9bDv Community Forums: https://bit.ly/2I8VCi5 TikTok: https://bit.ly/3fHoqdJ
May 21, 2021
All Change Streams Content
- Highest Rated
- Closest Upcoming
Using MongoDB Change Streams in JavaChange streams are an API that allows the user to subscribe to their application to any change in collection, database, or even on the entire deployment. There is no middleware or data polling action to be initiated by the user to leverage this event-driven, real-time data capture feature. Learn how to use change streams with Java in this article.
Apr 04, 2023
Rajesh S Nair
Real-Time Location Tracking with Change Streams and Socket.ioIn this article, you will learn how to use MongoDB Change Streams and Socket.io to build a real-time location tracking application. To demonstrate this, we will build a local package delivery service.
Feb 09, 2023
Working with Change Streams from Your Swift ApplicationChange streams let you run your own logic when data changes in your MongoDB collections. This post shows how to consume MongoDB change stream events from your Swift app.
Jan 25, 2023
Create a Data Pipeline for MongoDB Change Stream Using Pub/Sub BigQuery SubscriptionLearn how to set up a data pipeline from your MongoDB database to BigQuery using change streams and Google Cloud Pub/Sub.
Oct 28, 2022
Venkatesh Shanbhag (+1)
Oct 04, 2022
MongoDB Change Streams with PythonChange streams allow you to listen to changes that occur in your MongoDB database.
Feb 05, 2022
Change Streams & Triggers with Node.js TutorialDiscover how to react to changes in your MongoDB database using change streams implemented in Node.js and Atlas triggers.
Feb 04, 2022
Three Underused MongoDB FeaturesGo beyond CRUD with these 3 special features of MongoDB!
Feb 03, 2022
Java - Change StreamsLearn how to use the Change Streams using the MongoDB Java Driver.
Feb 01, 2022
Reacting to Database Changes with MongoDB Change Streams and GoLearn how to use change streams to react to changes to MongoDB documents, databases, and clusters in real-time using the Go programming language.
Feb 01, 2022