Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

231
Vistas
MongoDB tailable cursor timeout

I'm looking into using mongodb for a pub-sub model. I went through different articles like http://tugdualgrall.blogspot.fr/2015/01/how-to-create-pubsub-application-with.html and https://jpaljasma.blogspot.com/2013/11/howto-mongodb-tailable-cursors-in-nodejs.html.

I had a question on the numberOfRetries option on the cursor. If i set the option {'numberOfRetries': -1} will this ensure that the cursor will not timeout? Which means that i'll be able to get any new documents inserted into the capped collection even if there was a long delay in a document getting added to the collection?

Thanks.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can set a cursor flag, specifically the noCursorTimeout flag:

let cursor = collection.find({}, ...).addCursorFlag('noCursorTimeout', true);
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda