Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
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 Respostas
Responde à pergunta

0

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

let cursor = collection.find({}, ...).addCursorFlag('noCursorTimeout', true);
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda