There two python scripts producer.py and consumer.py in my application.
# producer.py
client = pulsar.Client("pulsar://localhost:6650")
producer = client.create_producer("topic1")
producer.send(pickle.dumps(obj))
producer = client.create_producer("topic2")
producer.send(pickle.dumps(obj))
# consumer.py
client = pulsar.Client("pulsar://localhost:6650")
consumer = client.subscribe("topic1", "sub1")
msg = consumer.receive()
consumer.acknowledge(msg)
data = msg.data()
consumer = client.subscribe("topic2", "sub2")
msg = consumer.receive()
consumer.acknowledge(msg)
data = msg.data()
The producer.py generates two topics, and the consumer.py subscribes two topics (The topic name is changed every run). When start producer.py at first, the consumer cannot receive anything, the process is blocking. When start consumer.py at first, then start producer.py, the consumer can receive the data of first topic, but the second topic is still cannot be received.