title: ZeroMQ multiple topics in publisher
body: <p>List <strong><code>a</code></strong> and <strong><code>b</code></strong> are the keys and the values. The values in variable <code>b</code> are assigned as topicnumbers and data is sent every 10 seconds to a topic. Is this is a stable way to distribute information? Does one see any difficulties for in the near future when the keys and thus topics are scaled up to 100+?</p>
  
  <pre><code>import zmq
  import random
  import time
  from  multiprocessing import Process
  
  a = ['one', 'two', 'three', 'four', 'five']
  b = [10, 20, 30, 40, 50]
  d = dict(zip(a, b))
  
  def pub001():
      port = "5100"    
      context = zmq.Context()
      socket = context.socket(zmq.PUB)
      socket.bind("tcp://*:%s" % port)
  
      while True:
          for i, x in d.items():
              topic = x
              number = random.randrange(1, 215)
              print(topic, number)
              socket.send_string("%d %d" % (topic, number))
              print("Data published", topic)
              time.sleep(10)
  
  if __name__ == "__main__":
      a =Process(target=pub001, args=())
      a.start()
  </code></pre>