@@ -162,53 +162,55 @@ Split Large Change Events Example
162162If your application generates change events that exceed 16 MB in size, the
163163server returns a ``BSONObjectTooLarge`` error. To avoid this error, you can use
164164the ``$changeStreamSplitLargeEvent`` pipeline stage to split the events
165- into smaller fragments.
165+ into smaller fragments. The {+driver-short+} aggregation API includes the
166+ ``ChangeStreamSplitLargeEvent()`` method, which you can use to add the
167+ ``$changeStreamSplitLargeEvent`` stage to the change stream pipeline.
166168
167- After you receive the change stream event fragments, you can use the
168- following helper methods to reassemble the fragments into a single
169- change stream document:
169+ This example instructs the driver to watch for changes and split
170+ change events that exceed the 16 MB limit. The code prints the
171+ change document for each event and calls helper methods to
172+ reassemble any event fragments:
170173
171174.. tabs::
172175
173176 .. tab:: Asynchronous
174- :tabid: split-event-helpers -async
177+ :tabid: change-stream-split -async
175178
176179 .. literalinclude:: /includes/code-examples/change-streams/change-streams.cs
177- :start-after: start-split-event-helpers -async
178- :end-before: end-split-event-helpers -async
180+ :start-after: start-split-change-event -async
181+ :end-before: end-split-change-event -async
179182 :language: csharp
180183
181184 .. tab:: Synchronous
182- :tabid: split-event-helpers -sync
185+ :tabid: change-stream-split -sync
183186
184187 .. literalinclude:: /includes/code-examples/change-streams/change-streams.cs
185- :start-after: start-split-event-helpers -sync
186- :end-before: end-split-event-helpers -sync
188+ :start-after: start-split-change-event -sync
189+ :end-before: end-split-change-event -sync
187190 :language: csharp
188191
189- This example instructs the driver to watch for changes and split
190- change events that exceed the 16 MB limit. The code prints the
191- change document for each event and calls the preceding helper methods to
192- reassemble any event fragments:
192+ The preceding example uses the ``GetNextChangeStreamEvent()`` and ``MergeFragment()``
193+ methods to reassemble change event fragments into a single change stream document.
194+ The following code defines these methods:
193195
194196.. tabs::
195197
196198 .. tab:: Asynchronous
197- :tabid: change-stream-split -async
199+ :tabid: split-event-helpers -async
198200
199201 .. literalinclude:: /includes/code-examples/change-streams/change-streams.cs
200- :start-after: start-split-change- event-async
201- :end-before: end-split-change- event-async
202+ :start-after: start-split-event-helpers -async
203+ :end-before: end-split-event-helpers -async
202204 :language: csharp
203205
204206 .. tab:: Synchronous
205- :tabid: change-stream-split -sync
207+ :tabid: split-event-helpers -sync
206208
207209 .. literalinclude:: /includes/code-examples/change-streams/change-streams.cs
208- :start-after: start-split-change- event-sync
209- :end-before: end-split-change- event-sync
210+ :start-after: start-split-event-helpers -sync
211+ :end-before: end-split-event-helpers -sync
210212 :language: csharp
211-
213+
212214.. tip::
213215
214216 To learn more about splitting large change events, see
0 commit comments