buergi1986/consumer-rabbitmq-go

By buergi1986

Updated about 2 years ago

The Stock Consumer receives stock updates from RabbitMQ and stores in MongoDB

Image
Message queues
0

192

buergi1986/consumer-rabbitmq-go repository overview

Stock Consumer

The stock-consumer is a Go application that connects to RabbitMQ to receive stock price updates and stores them in a MongoDB database. It is a crucial part of the real-time stock tracker system, ensuring that stock data is collected and persisted for further analysis and display.

Overview

This Docker image provides a containerized environment for running the stock-consumer application. It includes all the necessary dependencies and configurations to seamlessly deploy and run the application.

Usage

To use this Docker image, you can pull it from the Docker Hub repository using the following command:

docker pull buergi1986/consumer-rabbitmq-go:tagname

Replace tagname with the desired version or tag of the image.

Once pulled, you can run the container using the appropriate Docker commands, such as docker run. Make sure to provide any necessary environment variables or configuration options as per your requirements.

Environment Variables

The Docker image supports the following environment variables:

  • RABBITMQ_CONNECTION_URL: The URL for connecting to the RabbitMQ server (default: amqp://stockmarket:supersecret123@localhost:5672/)
  • MONGODB_URI: The URI for connecting to the MongoDB server (default: mongodb://localhost:27017/)
  • MONGODB_DATABASE: The name of the MongoDB database (default: stockmarket)
  • MONGODB_COLLECTION: The name of the MongoDB collection (default: stocks)

Example

Here's an example of how to run the container:

docker run -e RABBITMQ_CONNECTION_URL=amqp://rabbitmq-server:5672/ \
           -e MONGODB_URI=mongodb://mongodb-server:27017/ \
           -e MONGODB_DATABASE=my-stock-db \
           -e MONGODB_COLLECTION=stock-data \
           buergi1986/consumer-rabbitmq-go:latest

This command sets the required environment variables for connecting to RabbitMQ and MongoDB, and then runs the stock-consumer application inside the Docker container.

Tag summary

Content type

Image

Digest

sha256:de9eb3695

Size

22.3 MB

Last updated

about 2 years ago

docker pull buergi1986/consumer-rabbitmq-go:1.0.0