Connection and Consumption setup
Last updated
Was this helpful?
Last updated
Was this helpful?
So you've started to implement LSports services via RMQ, great choice! Let's get your connection running with a few simple steps.
This guide is intended to provide a better understanding of how the LSports Support team works to resolve issues in a timely manner and with minimal effort on your part.
The following example refers to these credentials: Username: MyEmail Password: Passw0rd1234 Package: 102030 (You should use the credentials provided by LSports)
Note: All examples below are written in C#.
When implementing your code, you need to get the RMQ library . Please be aware that LSports currently uses version 3.12.10
Start off by making sure that your distributor connection is enabled by sending an API call as follows: - Enable - Disable Method - POST
Response:
If the package was enabled the message should contain "Value was already set". For any other status or error message, please recheck your credentials or contact us.
Create a connection factory as follows:
RMQ HostName: InPlay: stm-inplay.lsports.eu PreMatch: stm-prematch.lsports.eu
Create a connection as follows:
Create a model as follows:
Configure the quality of service:
Consume message:
Start message consumption: (make sure to type in your package ID using underscores ('_') as describes) For example, if package ID was “102030”
When you subscribe to a fixture (event) on TRADE360, the first message you receive will be a complete picture, including all data for the fixture and its markets. This is followed by updates (deltas) that only reflect changes to the data.
If you ever disconnect from the TRADE360 feed, it's important to request a snapshot of the data before you start consuming the feed again. This ensures you have the latest information. You can request a snapshot using an API call. LSports offers two types of snapshots:
By comparing the timestamps of the snapshot data with the timestamps of the updates you receive in the feed, you can identify any missing information and keep your data synchronized.
Note: If the queue reaches 10000 unread/unpacked messages it will be automatically purged and your distributor connection will be disabled.
Most failed connection attempts occur due to incorrect credentials or incorrect connection details. Here are the most common errors and possible solutions:
"Connection failed" - Please check that the connection details i.e. Connection factory, RMQ host, VirtualHost were typed correctly. "Access refused"- Please check that your package is enabled and the login credentials and package ID were typed correctly.
For an in-depth explanation of our data structure, you may continue reading our documentation. Now all you need to do is, to start ordering our sports data according to your specific needs. An email notification will be sent to your contacts upon deletion of your queue
From here you should be able to pull up your RMQ connection and start receiving messages.
- Provides data for all events that are currently inplay.
- Provides data for all events that are currently prematch.