NCEAS / metadig-engine

MetaDig Engine: multi-dialect metadata assessment engine
7 stars 5 forks source link

`basic.reject` messages if the worker is busy #448

Open jeanetteclark opened 3 months ago

jeanetteclark commented 3 months ago

Currently, we have an early basic.ack which runs before the processReport method. We thought that this was working pretty well, but realized recently (see dataone-indexer 118) that is is likely the timeout issues we still occasionally see are coming up because rabbitmq sends another message as soon as the previous one was acked, thus starting the timeout timer again.

Ideally, the worker would reject messages that come when it isn't ready. We can use threads where one thread is either accepting or rejecting messages based on whether the second thread is alive.