In this example we are going to create a application-to-application (A2A) communication. Both applications are HTTP APIs. The client (publisher) dispatches events (image upload or download) and server (subscriber) listens on the events to handle them. We have two event types which are upload and download. Both of these are linked to image topic.

We are benefiting from topic filters because:

  • Subscribers are semantically related to each other.

  • Subscribers consume similar types of events.

  • Subscribers are supposed to share the same access permissions on the topic.

Steps

  1. Create a topic.

  2. Run server.

  3. Subscribe server to the topic.

  4. Client produces events.

#aws #golang #aws sns #api

Using Golang and AWS SNS to create a HTTP client and server API
1.25 GEEK