Build the publisher application:
go build ./publisher/publisher.go
or
make build_publisher
Run the publisher application:
RABBIT_HOST=localhost RABBIT_PORT=5672 RABBIT_USERNAME=username RABBIT_PASSWORD=password ./publisher
or
RABBIT_HOST=localhost RABBIT_PORT=5672 RABBIT_USERNAME=username RABBIT_PASSWORD=password make run_publisher
Send the message on publish:
curl -X POST -H "Content-Type: application/json" -d "{ \"lang\": \"go\", \"code\": \"fmt.Println(\"Hello there!\")\" }" http://localhost:8081/publish
or
LANG=javascript CODE=hello make send_message
Build the consumer application:
go build ./consumer/consumer.go
or
make build_consumer
Run the consumer application:
RABBIT_HOST=localhost RABBIT_PORT=5672 RABBIT_USERNAME=username RABBIT_PASSWORD=password ./consumer
or
RABBIT_HOST=localhost RABBIT_PORT=5672 RABBIT_USERNAME=username RABBIT_PASSWORD=password make run_consumer