Posts

Es werden Posts vom 2018 angezeigt.

Akka Streams Kafka

Producer A producer publishes messages to Kafka topics. The message itself contains information about what topic and partition to publish to so you can publish to different topics with the same producer. The underlaying implementation is using the KafkaProducer, see Javadoc for details.
Producer as a SinkProducer.plainSink is the easiest way to publish messages. The sink consumes ProducerRecord elements which contains a topic name to which the record is being sent, an optional partition number, and an optional key and value. Producer as a SinkProducer.plainSink is the easiest way to publish messages. The sink consumes ProducerRecord elements which contains a topic name to which the record is being sent, an optional partition number, and an optional key and value. Sharing KafkaProducer If you have many streams it can be more efficient to share the underlying KafkaProducer. You can create a KafkaProducer instance from ProducerSettings. ScalaJavaprotectedfinalProducerSettings<byte[],S…

Akka HTTP Client on Steroids

Overviewsqubs-httpclient project adds operationalization aspects to Akka HTTP Host-Level Client-Side APIwhile keeping the Akka HTTP API. Here is the list of features it adds: Service Discovery: Lets any service discovery mechanism to be plugged in and allows resolving HTTP endpoints by string identifiers, e.g., paymentserv.Per Client configuration: Let's each client to individually override defaults in application.conf.Pipeline: Allows a BidiAkka Streams flow to be registered globally or individually for clients.Metrics: Provides Codahale Metrics out-of-the-box for each client without  AspectJ.JMX Beans: Exposes the configuration of each client as JMX beans.Circuit Breaker: Provides resiliency with a stream based circuit breaker.
HTTP Model Scala Below is an HttpRequest creation example in Scala. Please see HTTP Model Scala documentation for more details: importHttpProtocols._ importMediaTypes._ importHttpCharsets._ valuserData =ByteString("abc") valauthorization = header…