title: RabbitMQ and python queue.Queue.get() is stuck
body: <p>I am tring to copy the upcoming datas to another queue.Queue() to do other stuffs in another thread.</p>
  <pre><code>def rgb_callback(ch, method, properties, body):
  rgb_color_bytes = np.frombuffer(body, dtype=np.uint8)
  READ_QUEUE.put(item=rgb_color_bytes, block=True)
  </code></pre>
  <p>and the config lines here</p>
  <pre><code>def start_rgb_consume_from_rabbitmq():
  try:
  
      #       RABBITMQ PART       #
  
      connection = pika.BlockingConnection(pika.ConnectionParameters(host=HOST_NAME))
      # connection.add_callback_threadsafe(rgb_data_read_from_python_queue)
      rgb_channel = connection.channel()
      rgb_channel.queue_declare(queue=RGB_QUEUE)
      rgb_channel.queue_purge(queue=RGB_QUEUE)
      rgb_channel.basic_consume(queue=RGB_QUEUE, on_message_callback=rgb_callback, auto_ack=True)
  
      rgb_channel.start_consuming()
  
  except Exception as err:
      print(&quot;Exception :&quot;, err)
      rgb_channel.stop_consuming()
  
  except KeyboardInterrupt:
      rgb_channel.stop_consuming()
      sys.exit(0)
  </code></pre>
  <p>and finally the queue.Queue().get() function that i failed at:</p>
  <pre><code>def rgb_data_read_from_python_queue():
  if STATUS2:
      cv2.namedWindow(WINDOW_TITLE2, cv2.WINDOW_AUTOSIZE)
  rgb_color_bytes = None
  while True:
      print(&quot;POINTER 1&quot;)
      try:
          rgb_frame = READ_QUEUE.get(block=True)
      except queue.Empty:
          rgb_frame = None
  
      if not rgb_frame:
          continue
  
      print(&quot;POINTER 2&quot;)
  </code></pre>
  <p>it is stucking there. I am new at threading and queue architecture. I am triying <code>add_callbak_threadsafe()</code> and I know that get() blocks the thread. But i created 2 different thread as here</p>
  <pre><code>rgb_data_thread = threading.Thread(target=rgb_data_read_from_python_queue)
  consumer_thread = threading.Thread(target=start_rgb_consume_from_rabbitmq)
  rgb_data_thread.start()
  consumer_thread.start()
  </code></pre>
  <p>So if i created 2 threads why queue.Queue().get() blocks the other one. Thanks for your helps. I can share whole code it is really simple and almost 170 lines.</p>