
MassTransit makes it easy to create applications and services that leverage message-based, loosely-coupled asynchronous communication for higher availability, reliability, and scalability. The only change I make for MassTransit to work with LocalStack is setting the ServiceURL in SNS and SQS. MassTransit is a free, open-source distributed application framework for.

Now with MassTransit I create the bus and start it.

#MASSTRANSIT ON DOCKER WINDOWS#
Beside this I run a windows service on the host machine, which has the task to send the event via the masstransit Request/Response model to the microservice.

Docker run -it -e SERVICES=sns,sqs -e TEST_AWS_ACCOUNT_ID="000000000000" -e DEFAULT_REGION="us-east-1" -e LOCALSTACK_HOSTNAME="localhost" -e -rm -privileged -name localstack_main -p 4566:4566 -p 4571:4571 -p 8080-8081:8080-8081 -v "/tmp/localstack:/tmp/localstack" -v "/var/run/docker.sock:/var/run/docker.sock" -e DOCKER_HOST="unix:///var/run/docker.sock" -e HOST_TMP_FOLDER="/tmp/localstack" "localstack/localstack" MassTransit - Lightweight message bus for creating distributed applications. I have a Rabbitmq server running in docker, also a small microservice in docker container which consumes an event.
