curefatih / message-sender

A basic automated message sender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

📬 message-sender

A basic message sender is an app that tries to send X messages for every N minute.

Run

Create webhook.site that returns a message

Creating webhook site url

Column Value
Status Code 202
Content type application/json

to create a random id with message field - use this payload

{
  "message": "Accepted",
  "messageId": "$request.uuid$"
}

Setting environment variables

Copy config.example.yml as config.yml and set the variables inside.

By default postgresql and redis credentials are in

  • docker/local.postgresql.env and,
  • docker/local.redis.env

You can also set other environment variables by checking the

but beware that some configs also need code changes.

Compose up

To run the entire application in detach mode

docker compose -f docker/docker-compose.local.yml up -d

if you just want to stop

docker compose -f docker/docker-compose.local.yml stop

and if you want to cleanup

docker compose -f docker/docker-compose.local.yml down

Usage

There is a swagger that can be accessible with link http://localhost:8080/swagger/index.html#/ for the local setup.

Also, for the database, there is an adminer container that can be accesible with link http://localhost:8082/

Limitations

For every iteration, we need to make sure that the processing rate is more or at least the same as the creation rate.

Initially, it is designed for 2 messages per 2 minutes. Higher limits might block the entire application.

About

A basic automated message sender


Languages

Language:Go 98.2%Language:Dockerfile 1.4%Language:Makefile 0.4%