Code Samples
Working examples for connecting to the TRADE RabbitMQ feed
This section provides working code examples for connecting to the TRADE RabbitMQ feed in various programming languages.
Available Samples
Prerequisites
Before running any code sample, ensure you have:
Valid credentials — Username, password, and Package ID provided by your CSM
Enabled distribution — Call the Distribution/Start API endpoint
Network access — Ability to reach the InPlay and PreMatch RMQ hosts listed below
Common Configuration
Connect using the username and password provided by your CSM. The host and virtual host depend on the feed type:
Host
stm-inplay.lsports.eu
stm-prematch.lsports.eu
Virtual Host
StmInPlay
StmPreMatch
Port
5672
Queue
_YOUR_PACKAGE_ID_ (e.g. _102030_)
Protocol
AMQP 0.9.1
Message Flow
Best Practices
Enable automatic recovery - Handle connection drops gracefully
Process messages asynchronously - Don't block the message loop
Implement proper logging - Track message flow and errors
Monitor heartbeats - Detect feed issues early
Use prefetch - Control message buffer size
Need Help?
If you need a code sample for a language not listed here, contact our support team.
Last updated
Was this helpful?