import pulsar, re

client = pulsar.Client('pulsar://127.0.0.1:6650')

consumer = client.subscribe(topic=['persistent://public/default/check-click', 'persistent://public/default/check-impression'], subscription_name='ew')

while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.value(), msg.message_id()))
        # Acknowledge successful processing of the message
        consumer.acknowledge(msg)
    except:
        # Message failed to be processed
        consumer.negative_acknowledge(msg)

client.close()
f1580afbfb45f8c1ba8c00ddec75b03e007f1a12
<mask token>

<mask token>
while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.value(), msg.
            message_id()))
        consumer.acknowledge(msg)
    except:
        consumer.negative_acknowledge(msg)
client.close()

<mask token>
client = pulsar.Client('pulsar://127.0.0.1:6650')
consumer = client.subscribe(topic=[
    'persistent://public/default/check-click',
    'persistent://public/default/check-impression'], subscription_name='ew')
while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.value(), msg.
            message_id()))
        consumer.acknowledge(msg)
    except:
        consumer.negative_acknowledge(msg)
client.close()

import pulsar, re
client = pulsar.Client('pulsar://127.0.0.1:6650')
consumer = client.subscribe(topic=[
    'persistent://public/default/check-click',
    'persistent://public/default/check-impression'], subscription_name='ew')
while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.value(), msg.
            message_id()))
        consumer.acknowledge(msg)
    except:
        consumer.negative_acknowledge(msg)
client.close()

import pulsar, re

client = pulsar.Client('pulsar://127.0.0.1:6650')

consumer = client.subscribe(topic=['persistent://public/default/check-click', 'persistent://public/default/check-impression'], subscription_name='ew')

while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.value(), msg.message_id()))
        # Acknowledge successful processing of the message
        consumer.acknowledge(msg)
    except:
        # Message failed to be processed
        consumer.negative_acknowledge(msg)

client.close()