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