I’m currently upgrading my microservices from:
.NET 3.1 to .NET 5.0
NServiceBus 7.2.0 to NServiceBus 7.5
NServiceBus.AmazonSQS 4.3.5 to 5.4.0
NServiceBus.Persistence.Sql 4.6.1 to 6.2.0
The microservices are completely event driven and each microservice starts its own endpoint. Before the upgrade we were using the Amazon SQS transport to register the publishers like this:
var routing = sqsTransport.Routing(); routing.RegisterPublisher(eventType, endpoint);
After the upgrade and deployment, I am facing the following issues:
The service’s endpoint starts fine. But upon receiving an event msg from another service, the following exception is thrown and the msg ends up in the error queue:
System.InvalidOperationException: No handlers could be found for message type: ServiceK.CardNumberUpdatedEvent
Second issue is that the subscriber services are no longer sending the Subscribe message to the publisher services.
As per the article: Upgrade AmazonSQS Transport Version 4 to 5 • Amazon SQS Transport • Particular Docs, I then changed the code to register the publishers like this:
var pubSubCompatibilityMode = sqsTransport.EnableMessageDrivenPubSubCompatibilityMode(); pubSubCompatibilityMode.RegisterPublisher(....)
Third issue is that even with enabling message driven pubsub compatibility mode, the Native Publish/Subscribe doesn’t work. I don’t see any SNS topics getting created in AWS. I also checked the Cloud Trail event history; I only see CreateQueue events. And don’t see any CreateTopic events.
Am I missing something here?