mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
12 lines
225 B
Python
Executable file
12 lines
225 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import pulsar
|
|
|
|
client = pulsar.Client("pulsar://localhost:6650")
|
|
|
|
producer = client.create_producer('my-topic')
|
|
|
|
for i in range(10):
|
|
producer.send(('Hello-%d' % i).encode('utf-8'))
|
|
|
|
client.close()
|