4lessandrodev / amqp-direct

Testando a conexão direta com amqp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testando rabbitmq - Sem Framework

Conexão direta com amqp sem usar nenhum framework

Exemplo

Referência: Documentação


Rodar o projeto

Requisitos:

  • NodeJS V14+ here
  • yarn here
  • docker here
  • docker-compose here
  • linux, wsl or mac
  • build-essentials here

Primeiros passos

Clone o projeto e exetute os passos

  • Installar as dependências
    make install
  • Iniciar o projeto
    make start
  • Visualizar logs
    make logs
  • Parar o projeto
    make stop
  • Deletar apps
    make delete

Enviando dados para a routing-key-01

curl --location --request POST 'http://localhost:4000/1' \
--header 'Content-Type: application/json' \
--data-raw '{
    "some": "any data to route 1"
}'

Enviando dados para a routing-key-02

curl --location --request POST 'http://localhost:4000/2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "some": "any data to route 2"
}'

About

Testando a conexão direta com amqp


Languages

Language:TypeScript 89.3%Language:Makefile 5.5%Language:JavaScript 5.1%