In this chapter, you learn how to connect to an ActorSystem to send messages from the outside. This is done so that any application can interact with actors. You see how to create servers in Akka that provide endpoints that can be used by HTTP or gRPC clients.
This module builds on Akka Streams and shares its semantics. Its components are internally defined in terms of Sources, Flows, and Sinks. However, these are hidden, and your interaction with this API is through an expressive DSL that lets you create URL paths, manage requests and responses, and more.
Akka HTTP is a comprehensive module that covers HTTP clients, HTTP servers, JSON and XML encoding, caching, and anything else you can think of to serve or use HTTP endpoints. However, this chapter focuses on the HTTP server you need to expose your ActorSystem.
NOTE
The source code for this chapter is available at www.manning.com/books/akka-in-action-second-edition or https://github.com/franciscolopezsancho/akka-topics/tree/main/chapter11a. You can find the contents of any snippet or listing in the .scala file with the same name as the class, object, or trait.