Delay in listening to contract events and sending information through webhooks

So I’m using Moralis to listen to certain events on a contract, and based on that I’m sending the information of that event to my backend server via webhooks, but there’s a huge delay in the information being updated on moralis and in turn getting reflected in our backend server.

So to explain a bit further, we have a NFT Sales Contract, and we are listening for List / Delist / Purchase events. After those methods have been called on the contract, we get 2 responses from moralis, one with confirmed: false and 2nd with confirmed: true, and we are implementing logic when we get confirmed: true, but this 2nd response can take anywhere from around 15-20 mins to get delivered, and this is only if there is only one event triggered.

So, if I like try to list 10 NFTs in one go, all these events would get stacked, and would be triggered one after another with a 15-20 mins delay, and that too there are 2 responses for every event, so I’ll have to wait like 300 mins for the last nft details to get updated on moralis as well as for it to send it to our backend and then process the logic.

Server Details

SERVER_URL = https://yxl7bn8c9umq.usemoralis.com:2053/server
CHAIN = Polygon ( mumbai )
SALES CONTRACT ADDRESS = 0xD68603215c4646386d2e0bE68a38027CE4a7652d
LISTING TOPIC = Listed (address, uint256, address, uint256)
DELISTING TOPIC = Delisted(address , uint256 , address , uint256)
PURCHASE TOPIC = Purchased(address ,uint256 ,address ,address ,uint256 ,uint256)

Please let me know how this can be fixed.

You can use Triggers and for example implement beforeSave to have custom code so you can check so you dont send double signals

https://docs.moralis.io/moralis-server/cloud-code/triggers

you can do http request to your server with the info https://docs.moralis.io/moralis-server/cloud-code/httprequest


confirmed:true can take time because we wait for blockchain to build more blocks to guarantee reorg protection - you can ignore it if you want instant signals

that server has a small number of rows in db, you shouldn’t get that delay
maybe there is a problem in a different place, you could try to log info without using the webhook