Python - Multiple MQTT subscriptions - limitations

I have n-raspberry pi's and I would like each of them to subscribe to the rest of them as they all act like brokes. Servers and Clients works perfectly, but I would like to know, if there is some limitation. I plan to run the suscription scripts in Threads. These are requirements:

  • Speed (I publish something and many pis receive message at the same time)
  • Unlimited subscriptions (I want up to 50 pi's in network)

The Idea is to create decentralized network. The above can be easily substitued by special pi that would act as centralized unit so all pis subscribe to this special pi and would all receive particular message at the same time. But I prefer decentralized architecture.

Is it possible, or there is some networking problem? ps: I dont have enough Pi's to test it.

I will attach code with Subscription class. It works, but I put it here, because I dont want to only ask a question, but atleast contribute. Its a same class I use for Subscribing

import paho.mqtt.client as mqtt
import threading
import json
# Define Variables
MQTT_BROKER = ""
MQTT_PORT = 1883
MQTT_KEEPALIVE_INTERVAL = 45
MQTT_TOPIC = ""

class sub:
    def __init__(self,MQTT_TOPIC,MQTT_BROKER, MQTT_PORT,MQTT_KEEPALIVE_INTERVAL,transport = ''):
        self.MQTT_TOPIC = MQTT_TOPIC
        self.MQTT_BROKER =MQTT_BROKER
        self.MQTT_PORT = MQTT_PORT
        self.MQTT_KEEPALIVE_INTERVAL = MQTT_KEEPALIVE_INTERVAL
        # Initiate MQTT Client
        if transport == 'websockets':
            self.mqttc = mqtt.Client(transport='websockets')
            print('Here')
        else:
            self.mqttc = mqtt.Client()
        self.load = True
        tr = threading.Thread(target=self.start)
        tr.daemon = True
        tr.start()



    # Define on_connect event Handler
    def on_connect(self,selfs,mosq, obj, rc):
        #Subscribe tox a the Topic
        self.mqttc.subscribe(self.MQTT_TOPIC, 0)

    # Define on_subscribe event Handler
    def on_subscribe(self,mosq, obj, mid, granted_qos):
        print("Subscribed to MQTT Topic")

    # Define on_message event Handler
    def on_message(self,mosq, obj, msg):
        print(msg.payload)
        if self.load == True:
            msg.payload = json.loads(msg.payload)

    def start(self):
        # Initiate MQTT Client
        #self.mqttc = mqtt.Client()

        # Register Event Handlers
        self.mqttc.on_message = self.on_message
        self.mqttc.on_connect = self.on_connect
        self.mqttc.on_subscribe = self.on_subscribe

        # Connect with MQTT Broker
        self.mqttc.connect(MQTT_BROKER, MQTT_PORT, MQTT_KEEPALIVE_INTERVAL )

        # Continue the network loop
        self.mqttc.loop_forever()


s=sub(MQTT_TOPIC,MQTT_BROKER,MQTT_PORT,MQTT_KEEPALIVE_INTERVAL)