Giter Site home page Giter Site logo

sanzharanarbay / golang_rabbitmq_example Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 12 KB

Implementation of rabbitmq consumer and producer in golang with docker deployment

License: MIT License

Shell 4.96% Go 78.44% Dockerfile 16.61%
amqp docker docker-compose golang rabbitmq go rabbit-mq rabbitmq-consumer rabbitmq-exchange rabbitmq-management rabbitmq-producer

golang_rabbitmq_example's Introduction

#Golang rabbit-mq example

How to run rabbitmq and application

  • docker-compose build --no-cache
  • docker-compose up -d
  • docker-compose ps
  • docker-compose logs -f {service-name}
  • send POST request to API' , http://127.0.0.1:8080/api/v1/rabbit-mq/push , for pushing messages
  • docker-compose down (if you want to stop and remove containers)

Body
{
    "id":1,
    "fio":"Sanzhar Anarbay",
    "department":"Test",
    "age":23,
    "mark":3.45
}

  • visit http://localhost:15672/ - (GUI RabbitMQ management ) , (login, password shown in .env file)
  • visit http://localhost:9000/ - Portainer (GUI Docker containers)
  • In portainer open producer-api container and see the logs , to check the message delivery status
  • In portainer open consumer and see the logs , to check is consumer handle the message from the queue
  • There are in general 3 .env files, in root directory , also in the consumer and producer-api directories

golang_rabbitmq_example's People

Contributors

sanzharanarbay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.