How do I work with TRADE360 feed?
Last updated
Last updated
The TRADE360 is a system that works as a “delta update mode” product for markets/settlements and “full update mode” for fixtures/livescore, it means that the customer is supposed to be connected to the RabbitMQ updates without any disconnection/issues/bugs. As we all know, it’s impossible in the programming world especially when we talking about the “between” services communication (in our case RabbitMQ is a TCP-based communication)
This API will provide you with all the latest messages sent to your RabbitMQ Queue, ensuring you stay fully updated. Whether or not you're subscribed to the queue and have received the messages, they'll be included in the Snapshot API response. This way, we ensure you're always updated, even if any issues arise.
To fully recover correctly from any connectivity issue that you experienced, you will need to perform the following steps:
1. Start to listen to your RabbitMQ queue - don’t process the messages before the second step is done. 2. Request the latest snapshot from the Snapshot API - please take a look at the cases segment for your next steps after sending the snapshot API request. After step 2 processing is finished, Please start to process all the messages you have received to your RabbitMQ. The synchronization mechanism of the snapshot and the RabbitMQ updates are supposed to be working according to the bets last update values. (There is a possibility that the RabbitMQ update will be outdated compared to the snapshot update).
It’s very important to store the received messages in the process memory or other internal/external cache solutions and not to leave the messages in the Queue. Your queue is limited to holding 10K messages at the top. After that number is reached your distribution will turn off automatically and you will have to reconnect again and do the whole processing again. That can cause your service to be in an infinite loop.
There are 2 reasons to send the snapshot API request: 1. Disconnection from the RabbitMQ - no matter what is the reason, if you lost some updates your feed is probably outdated. For this type of problem, you probably will have to send a full snapshot request but it’s strongly recommended to filter the request according to the relevant timestamps (for more information please read the documentation)
2. Message Sequence inconsistency for market updates - If the number of the Message Sequence you received is not successive (always increased by one), you probably missed some messages. If the inconsistency appears for Livescore/Fixture update it is not a crucial issue because all the updates are snapshots. But if the case is with markets/settlements you need to send a snapshot request for the specific problem. Please read the snapshot documentation. (In most cases you wouldn’t have to send a full snapshot request!) Documentations: