The stock-publisher
is a Go application designed to simulate stock transaction events (buy or sell) for companies like Microsoft (MSFT), Tesla (TSLA), and Apple (AAPL). It connects to RabbitMQ and publishes synthetic stock price data to dedicated queues for each stock.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
- Go (version 1.20 or later)
- Docker
- Access to a RabbitMQ server
A step-by-step series of examples that tell you how to get a development environment running.
-
Clone the repository
git clone https://github.com/switzerchees/stock-publisher.git cd stock-publisher
-
Build the application
go build
-
Run the application
./stock-publisher
RABBITMQ_URL
: The URL of the RabbitMQ server (default:amqp://stockmarket:supersecret123@localhost:5672/
)TICKER_INTERVAL
: The interval in milliseconds between producing new stock price (default:1
)