Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 503 Bytes

readme.md

File metadata and controls

31 lines (25 loc) · 503 Bytes

Running the Server

pip3 install -r requirements.txt
python3 app.py

Using client

Making Connection

from smqc import smqc
queue = smqc.Connection("localhost",5000)

Listening Messages

key = input("Enter key: ")
def on_message(key, messages):
	print(key)
	print(messages)

queue.start_polling(key, on_message)

Publishing Messages

key = input("Enter the key: ")
message = input("Message: ")
queue.publish_message(key, message)