package akkastream
- Alphabetic
- Public
- All
Type Members
-
abstract
class
AkkaServerStreamlet extends AkkaStreamlet with Server
An AkkaStreamlet that can listen on a port.
An AkkaStreamlet that can listen on a port. Using this trait instead of the AkkaStreamlet ensures that the streamlet will get an endpoint in Kubernetes. This trait mixes on the
Server
trait which is required for using a ServerStreamletLogic. The ServerStreamletLogic provides acontainerPort
and agetContainerPort()
method. It returns the TCP port that is opened on the container. Listen on all interfaces ("0.0.0.0") and use the port returned bycontainerPort
to start a TCP server that will be exposed by an endpoint in Kubernetes. -
abstract
class
AkkaStreamlet extends Streamlet[AkkaStreamletContext]
Extend from this class to build Akka-based Streamlets.
-
trait
AkkaStreamletContext extends StreamletContext
Runtime context for AkkaStreamlets, which provides means to create Sources and Sinks respectively for CodeInlets and CodeOutlets.
Runtime context for AkkaStreamlets, which provides means to create Sources and Sinks respectively for CodeInlets and CodeOutlets. The StreamletContext also contains some lifecycle hooks, like
signalReady
,onStop
andstop
and provides access to the streamlet configuration. It also provides the ActorSystem and Materializer that will be used to run the AkkaStreamlet. -
final
class
AkkaStreamletContextImpl extends AkkaStreamletContext
Implementation of the StreamletContext trait.
-
abstract
class
AkkaStreamletLogic extends StreamletLogic[AkkaStreamletContext]
Provides an entry-point for defining the behavior of an AkkaStreamlet.
Provides an entry-point for defining the behavior of an AkkaStreamlet. Override the
run
method to implement the specific logic / code that should be executed once the streamlet deployed as part of a running cloudflow application. SeeRunnableGraphStreamletLogic
if you just want to create a RunnableGraph.The usual process consists of getting akka stream Sources to inlets with atLeastOnceSource or atMostOnceSource, consuming elements from these using akka stream operators, and writing to outlets via Sinks that are provided by atLeastOnceSink or atMostOnceSink.
- final class KafkaSinkRef[T] extends WritableSinkRef[T]
- final case class PortNotFoundException(port: StreamletPort, context: StreamletContext) extends RuntimeException with Product with Serializable
-
sealed
trait
ResetPosition extends AnyRef
The position to initially start reading from, when using
plainSource
.The position to initially start reading from, when using
plainSource
.Maps to the "auto.offset.reset" Kafka setting with
autoOffsetReset
. -
trait
Server extends AnyRef
Provides
containerPort
and agetContainerPort()
method.Provides
containerPort
and agetContainerPort()
method. It returns the TCP port that is opened on the container. A ServerStreamletLogic requires an implementation of this trait (for instance an AkkaServerStreamlet) when it is created. -
abstract
class
ServerStreamletLogic extends AkkaStreamletLogic
Extends a StreamletLogic.
Extends a StreamletLogic. provides access to a containerPort so that it is possible to start a TCP server inside an AkkaStreamlet which will be exposed through an endpoint in Kubernetes.
-
trait
WritableSinkRef[T] extends SinkRef[(T, CommittableOffset)]
Extends akka.stream.SinkRef with a
write
method that can be used to write data directly to the implementation thatSinkRef.sink
writes to.Extends akka.stream.SinkRef with a
write
method that can be used to write data directly to the implementation thatSinkRef.sink
writes to. Using thewrite
method can be more convenient, especially when you want to write one value at a time and continue only once the write has completed. The alternative would be to use:Source.single(value).runWith(sink)))
but in that case it is not known when the value has been written.
Value Members
- object AkkaStreamletContextImpl
- object AkkaStreamletRuntime extends StreamletRuntime with Product with Serializable
-
object
Earliest extends ResetPosition with Product with Serializable
Automatically reset the offset to the earliest offset.
-
object
Latest extends ResetPosition with Product with Serializable
Automatically reset the offset to the latest offset.