Reference

This is the reference documentation for an Alpakka connector. This section should contain a general overview of the connector and mention the libraries and APIs that the connector is using. Also it should link to external resources that might help to learn about the technology the connector is using.

Reported issues

Tagged issues at Github

Artifacts

sbt
libraryDependencies += "com.lightbend.akka" %% "akka-stream-alpakka-reference" % "1.0-M1"
Maven
<dependency>
  <groupId>com.lightbend.akka</groupId>
  <artifactId>akka-stream-alpakka-reference_2.12</artifactId>
  <version>1.0-M1</version>
</dependency>
Gradle
dependencies {
  compile group: 'com.lightbend.akka', name: 'akka-stream-alpakka-reference_2.12', version: '1.0-M1'
}

Reading messages

Give a brief description of the usage of this connector. If you want to mention a class name, make sure to link to the API docs: ReferenceReadMessage.

If any of the API classes are different between Scala and Java, link to both API docs: Reference Reference.

Show an example code snippet of how a source of this connector can be created.

Scala
val settings: SourceSettings = SourceSettings(ClientId)

val source: Source[ReferenceReadResult, Future[Done]] =
  Reference.source(settings)
Full source at GitHub
Java
final SourceSettings settings = SourceSettings.create(clientId);

final Source<ReferenceReadResult, CompletionStage<Done>> source = Reference.source(settings);
Full source at GitHub

Wrap language specific text with language specific directives, like @scala for Scala specific text@java for Java specific text.

Writing messages

Show an example code snippet of how a flow of this connector can be created.

Scala
val flow: Flow[ReferenceWriteMessage, ReferenceWriteResult, NotUsed] =
  Reference.flow()
Full source at GitHub
Java
final Flow<ReferenceWriteMessage, ReferenceWriteResult, NotUsed> flow = Reference.flow();
Full source at GitHub

Running the example code

The code in this guide is part of runnable tests of this project. You are welcome to edit the code and run it in sbt.

Scala
sbt
> reference/testOnly *.ReferenceSpec
Java
sbt
> reference/testOnly *.ReferenceTest
Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.