/sqs-ex

Primary LanguagePython

How to run simple messaging system

Purpose

The solution is sending and receiving messages from a queue.

Prerequisites

Running the code

queues.py contains functions for working with a queue. client_sender.py is a client for sending messages to a queue. client_receiver.py is a client for receiving messages from a queue. input.txt is a text file with some input text. output.txt is a test file for the output.

Send messages:

For sending the messages to the queue use this command:

python3 -m client_sender.py

Make sure theese parameters are set properly: input_file - path to the input file queue_name - the name of the exising SQS queue

Receive messages:

For receiving the messages from the queue use this command:

python3 -m client_receiver.py

Make sure theese parameters are set properly: output_file - path to the output file queue_name - the name of the exising SQS queue

References