Here comes my code on my publisher app (a netcore API).
services.AddMassTransit(masstransit =>
{
masstransit.UsingRabbitMq((context, cfg) =>
{
cfg.Host(new Uri("rabbitmq://srv-docker-dev-01"), "/", h =>
{
h.Username("guest");
h.Password("guest");
});
cfg.ReceiveEndpoint("implantacao", e =>
{
e.ConfigureConsumeTopology = false;
e.Bind<ClienteAlteradoEvento>();
});
});
});
Even before I create a consumer, my RabbitMQ shows a skipped queue.
And the message is delivered on this __skipped.
Can someone tell me what I'm doing wrong?
Just a few points:
Any thoughs and ideas, will be welcome. I'm just learning about RabbitMQ.
EDIT
Microservice A: Have endpoints to receive user input data of customers. Users send data like names, contracts, and anything else (many different types of data can be changed on different endpoints). Every time a customer is updated, this API should publish messages to update other microservices too. Lets say we have at least 3 different events: CustomerDataUpdatedEvent, CustomerAddressUpdatedEvent, CustomerContractsUpdatedEvent.
Microservice B: Want to consume the updates from costumer published by Microservice A. We don't have access to CustomerDataUpdatedEvent, CustomerAddressUpdatedEvent, CustomerContractsUpdatedEvent classes. We should build our class type on its side.
Microservice C: Want to consume the updates from costumer published by Microservice A. We don't have access to CustomerDataUpdatedEvent, CustomerAddressUpdatedEvent, CustomerContractsUpdatedEvent classes. We should build our class type on its side.
Neither B or C have access to class type on microservice A.
Is that possible? Does it makes sense?
Thanks
You are configuring a receive endpoint without any consumers on it. So any message produced that arrives on the queue will just be copied to the _skipped
queue.
I'd suggest reading some documentation to get the feel for how messages, consumers, and endpoints are configured.
I wouldn't suggest using a single exchange (or even a single queue) for all the messages in a service, but since you're just learning I don't really know what else to suggest without details.