title: How to send byte message with ZeroMQ PUB / SUB setting?
body: <p>So I'm new to ZeroMQ and I am trying to send byte message with ZeroMQ, using a <code>PUB / SUB</code> setting.</p>
  <p>Choice of programming language is not important for this question since I am using ZeroMQ for communication between multiple languages.</p>
  <p>Here is my server code in python:</p>
  <pre><code>import zmq
  import time
  
  port = &quot;5556&quot;
  context = zmq.Context()
  socket = context.socket(zmq.PUB)
  socket.bind(&quot;tcp://*:%s&quot; % port)
  while True:
      socket.send(b'\x84\xa5Title\xa2hi\xa1y\xcb\x00\x00\x00\x00\x00\x00\x00\x00\xa1x\xcb@\x1c\x00\x00\x00\x00\x00\x00\xa4Data\x08')
      time.sleep(1)
  </code></pre>
  <p>and here is my client code in python:</p>
  <pre><code>import zmq
  
  context = zmq.Context()
  socket = context.socket(zmq.SUB)
  socket.connect(&quot;tcp://localhost:5556&quot;)
  
  total_value = 0
  for update_nbr in range (5):
      string = socket.recv()
      print (string)
  </code></pre>
  <p>My client simply blocks at <strong><code>string = socket.recv()</code></strong>.</p>
  <p>I have done some study, so apparently, if I were to send string using <code>PUB / SUB</code> setting, I need to set some &quot;<strong>topic filter</strong>&quot; in order to make it work. But I am not sure how to do it if I were to send some byte message.</p>