Connection configuration

Modified on Wed, 21 Feb 2024 at 02:55 PM

Changing the connection string :

The following example refers to these credentials:
Username: MyEmail
Password: Passw0rd1234
Package: 102030
(You should use the credentials provided by LSports)


For Inplay : 

Trade 360 Inplay access URL - HostName : stm-inplay.lsports.eu

ConnectionFactory connectionFactory = new ConnectionFactory {     HostName = "Described above",     Port = 5672,     UserName = "MyEmail",     Password = "Passw0rd1234",     AutomaticRecoveryEnabled = true,     VirtualHost = "StmInPlay", //For InPlay     RequestedHeartbeat = 580,     NetworkRecoveryInterval = TimeSpan.FromSeconds(1)     //Create a connection     IConnection connection = _connectionFactory.CreateConnection();     //Create a model     IModel model = connection.CreateModel();     //Quality of service     model.BasicQos(prefetchSize: 0, prefetchCount: 100, global: false);     //Consume message:     EventingBasicConsumer consumer = new EventingBasicConsumer(model);     consumer.Received += (sender, eventArgs) => {     // Deserialize message     // Call method to handle deserialized message };     //Start message consumption:    //(make sure to type in your package ID using underscores ('_') as describes)     //For example, if package ID was “102030”     model.BasicConsume(queue: '_102030_', noAck: true, consumer: consumer) };

 

For Prematch: 

Trade 360 Prematch access URL - HostName : stm-prematch.lsports.eu

ConnectionFactory connectionFactory = new ConnectionFactory {     HostName = "Described above",     Port = 5672,     UserName = "MyEmail",     Password = "Passw0rd1234",     AutomaticRecoveryEnabled = true,     VirtualHost = "StmPreMatch", //For PreMatch     RequestedHeartbeat = 580,     NetworkRecoveryInterval = TimeSpan.FromSeconds(1)     //Create a connection     IConnection connection = _connectionFactory.CreateConnection();     //Create a model     IModel model = connection.CreateModel();     //quality of service     model.BasicQos(prefetchSize: 0, prefetchCount: 100, global: false);     //Consume message:     EventingBasicConsumer consumer = new EventingBasicConsumer(model);     consumer.Received += (sender, eventArgs) => {     // Deserialize message     // Call method to handle deserialized message };     //Start message consumption:     //(make sure to type in your package ID using underscores ('_') as describes)      //For example, if package ID was “102030”     model.BasicConsume(queue: '_102030_', noAck: true, consumer: consumer) };

When you're implementing your own code, you will need to get the RMQ library here.

 

for enabling your connection use this API requset:

https://stm-api.lsports.eu/Distribution/Start - Enable 

 

For disabling your connection use this API requset:

https://stm-api.lsports.eu/Distribution/Stop - Disable 

API requset example : 

{     "PackageId": YourPackageId,     "UserName": "YourUserName",     "Password": "YourPassword" }

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article