AKKA ssl over TCP

(Raji) #1

I am able to connect to tcp and read messages with the below java code.

final InetSocketAddress remote = new InetSocketAddress(InetAddress.getByName(address), port);
final ActorRef tcp = Tcp.get(getContext().getSystem()).manager();
tcp.tell(TcpMessage.connect(remote), getSelf());

Now i need to connect plain ssl over tcp, for which I didn’t find an example. (I found some examples using TCPPipelineHandler, but it does not exist in akka 2.5.x)

It would be great if someone could provide an example to set up tcp-ssl socket using akka 2.5 version.

Many thanks

(Patrik Nordwall) #2

I would recommend TCP in Akka Streams instead, and there you also find documentation for TLS. https://doc.akka.io/docs/akka/current/stream/stream-io.html

(Raji) #3

Ok, Thank you. I will look into it.