Skip to content

DATAMONGO-501: Initial push for Tailable Cursor Support (Review Only) #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

amolnayak311
Copy link
Contributor

This pull request is meant for review purpose only and to demonstrate the prototype developed, and collecting opinions and views about the new feature that is planned to be added to MongoTemplate to tail a capped collection.

Some information about tailable cursors can be found here

http://www.mongodb.org/display/DOCS/Tailable+Cursors

The feature included in mongo template looks like this

TailingCursorHandle handle = template.tailCollection("SomeTestCappedCollection", "id",
      new TailingCursorDocumentListener() {
          public void processDocument(DBObject doc) {
              //process the doc here
          }
});

The first two parameters are the name of the capped collection to be tailed and the increasing key which forms the basis for tailing the collection.
The third parameter is an implementation of TailingCursorDocumentListener which is the callback interface whose processDocument is invoked when a new document is found at the tail of the collection.

The handle is primarily used to let the invoking process stop the tailing that happens asynchronously.

See MongoTemplateTests for some test cases written around tailable cursor.

@cexbrayat
Copy link

It would be great to have Tailable Cursor in Spring Data. We are really looking forward to it!

@ttrelle
Copy link
Contributor

ttrelle commented Apr 5, 2013

+1

@odrotbohm odrotbohm force-pushed the master branch 2 times, most recently from 9cbd59a to d2ecd65 Compare September 5, 2014 12:27
gregturn pushed a commit that referenced this pull request Oct 30, 2014
Gem installation instructions updated
@benneq
Copy link

benneq commented Apr 14, 2015

any news on this?

@matthew-b-payne
Copy link

+1 make this happen

@mp911de
Copy link
Member

mp911de commented Oct 18, 2016

Tailable cursors will (most likely) come with Reactive MongoDB support. The reactive driver comes with its own threading infrastructure and push data down the stream (see #393)

@pivotal-issuemaster
Copy link

@amolnayak311 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@mp911de
Copy link
Member

mp911de commented Apr 26, 2017

Tailable cursors are now part of Reactive MongoDB support hence closing this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants