

is the rabbitmq management console log in with guest as username and password. You should see the following output Application is starting.ġ72.17.0.2 was my-rabbit container ip address but you can replace it with your machine ip address

To verify your receiving messages run docker logs some-dotnetapp -follow NET Core 5 using ASP.NET Web API, Docker Compose, RabbitMQ, MassTransit, Portainer, gRPC, Protocol Buffers, SQL Server, Redis, MongoDB, PostgreSQL, Dapper. ĭocker run -d -e -name some-dotnetapp dotnetapp Start rabbitmq in docker and expose ports on the host docker run -d -p 5672:5672 -p 15672:15672 -hostname my-rabbit -name some-rabbit rabbitmq:3-managementīuild and run console app. I created an example, and was able to connect my host, using the preview package from masstransit. Var message = (body) Ĭonsole.WriteLine(" Received ", message) Ĭonsole.WriteLine(" Press to exit.") ĭocker file FROM microsoft/dotnet:1.1-runtime Var consumer = new EventingBasicConsumer(channel) Using (var channel = connection.CreateModel()) Using (var connection = factory.CreateConnection())

Using RabbitMQ Client public static void Main() Var host = cfg.Host(new Uri(rabbitMqUri), hst =>Ĭonsole.WriteLine("Service Running. String password = assetServiceQueue = "hello" Using Masstransit string rabbitMqUri = "rabbitmq://192.168.0.9/" But similar implementation using RabitMq.Client is able to connect to host machine RabbitMQ instance.
#MASSTRANSIT ON DOCKER CODE#
Masstransit code fails to connect to RabbitMQ instance on host machine. net core console application with docker support.
