From e48124ea22a6ec2b199128fa6272a3a4347310f9 Mon Sep 17 00:00:00 2001 From: zhouzixin Date: Sun, 5 May 2024 15:02:44 +0800 Subject: [PATCH] Add pulsar plugin --- tests/plugin/data/sw_pulsar/docker-compose.yml | 3 ++- tests/plugin/data/sw_pulsar/services/consumer.py | 2 +- tests/plugin/data/sw_pulsar/services/producer.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/plugin/data/sw_pulsar/docker-compose.yml b/tests/plugin/data/sw_pulsar/docker-compose.yml index 410c1376..4807fdb5 100644 --- a/tests/plugin/data/sw_pulsar/docker-compose.yml +++ b/tests/plugin/data/sw_pulsar/docker-compose.yml @@ -27,7 +27,8 @@ services: image: apachepulsar/pulsar:3.2.0 hostname: pulsar-server ports: - - "6650:6650" + - 6650:6650 + - 8080:8080 networks: - beyond healthcheck: diff --git a/tests/plugin/data/sw_pulsar/services/consumer.py b/tests/plugin/data/sw_pulsar/services/consumer.py index 1257d7cc..fc444b12 100644 --- a/tests/plugin/data/sw_pulsar/services/consumer.py +++ b/tests/plugin/data/sw_pulsar/services/consumer.py @@ -18,7 +18,7 @@ if __name__ == '__main__': import pulsar - client = pulsar.Client('pulsar://pulsar-server:6650') + client = pulsar.Client(service_url='pulsar://pulsar-server:6650') consumer = client.subscribe('sw-topic', 'sw-subscription') while True: diff --git a/tests/plugin/data/sw_pulsar/services/producer.py b/tests/plugin/data/sw_pulsar/services/producer.py index f5369de3..b963e597 100644 --- a/tests/plugin/data/sw_pulsar/services/producer.py +++ b/tests/plugin/data/sw_pulsar/services/producer.py @@ -22,7 +22,7 @@ from pulsar import BatchingType app = Flask(__name__) - client = pulsar.Client('pulsar://pulsar-server:6650') + client = pulsar.Client(service_url='pulsar://pulsar-server:6650') producer = client.create_producer( 'sw-topic', block_if_queue_full=True,