Skip to main content

Sneakers

Sneakers is a ruby gem which consumes messages from RabbitMq. It is essentially a queueing engine which repeatedly perfoms tasks.

Responsibilities

  • Generating INPUT files for PAAF and Debit Order service
  • SFTPing files to and from NETUP*
  • Scraping the bank site
  • Informing any errors/general messages to slack

*NETUP - We currently use netup to transfer all ABSA files, the reason for this is ABSA used to have proprietary Windows software needed to do this. Netup provided a service where we could do this via Linux. Last I heard ABSA now do SFTP so need to investigate that.

RabbitMQ

Locally when running RabbitMQ there is a webservice you can use to view the queues.

  • You can browse to http://localhost:15672
  • Login with the details found in your .env file
  • Head on over to Queues section

There are 2 types of queues, delayed and normal. Sneakers will consume messages on the normal queues almost instantly. RabbitMq will move messages from the delayed queue into the normal queue when the x-message-ttl has been reached. Sneakers will do the work and at the end publish a message back onto the delayed queue. Some work is done more often than others and so the ttl is set lower. You can view the publisher at here .

Workers

All of sneakers work is done from the /app/workers folder. The worker is responsible for checking for anything on RabbitMq, it will then execute a job which contains certain business logic, jobs are found in /app/jobs/ folder.