Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 618 Bytes

README.md

File metadata and controls

48 lines (33 loc) · 618 Bytes

Pub-Sub

Publisher-Subscriber model using Python. Supports for Multiple servers and clients.

Server

Run

cd server
python main.py -p <port>

example:

python main.py -p 5000

Add More servers:

python main.py -p <port> -r <previous server ip>:<previous server port>

example:

python main.py -p 5001 -r 127.0.0.1:5000
python main.py -p 5002 -r 127.0.0.1:5000,127.0.0.1:5001

Client

Run

cd client
python main.py <host> <port> <Publisher/Subscriber> <topic>

example:

python main.py 127.0.0.1 5000 Publisher topic1