3etDevelopers
Push API / Get started

Connection & security

Get broker access, then create and bind your queues.

Before consuming, contact your support channel to receive connection details and be granted access to the RabbitMQ broker cluster. Your IPs must be whitelisted.

SettingValue
Virtual host/
Exchange<ACCOUNT_ID>
Queue name prefix<ACCOUNT_ID>. — e.g. 1213.soccer
Auto-deleteEnabled

Example consumer

consumer.py
import json, pika

ACCOUNT_ID = "1213"
conn = pika.BlockingConnection(pika.URLParameters("amqps://user:pass@<broker>/%2F"))
ch = conn.channel()

queue = f"{ACCOUNT_ID}.soccer"
ch.queue_declare(queue=queue, auto_delete=True)
ch.queue_bind(queue=queue, exchange=ACCOUNT_ID, routing_key="7.*.*.PRICES")

def on_message(ch, method, props, body):
    msg = json.loads(body)
    print(msg["type"], len(msg["data"]))

ch.basic_consume(queue=queue, on_message_callback=on_message, auto_ack=True)
ch.start_consuming()