I’ve been learning about NServiceBus and using it through AWS Lambda. I’ve been following along with the following guide:
and the following blog post:
I’ve implemented a cloud function from Lambda which sends a test message into SQS via NServiceBus, and a lambda service which is triggered by the message being inserted into the queue. Very much like the step-by-step guide. Everything works so far. The problem happens after I handle the message in the lambda service. I’m calling the following method:
await context.Publish(new BasicEvent(message.Id));
I’m assuming that the topic will be automatically created as mentioned in the blog post:
“You can even send commands or publish events using the NServiceBus API. NServiceBus takes care of creating the necessary SQSClient or SNSClient for you. NServiceBus will also manage the cases where one message in a batch fails, making sure that only failed messages are retried and that outgoing messages are only dispatched if the individual message processing succeeds.”
But nothing happens.
Has anyone implemented a successful Command Handler which then publishes successfully to SNS via a AWS Lambda function?
Thanks!