Alpakka Samples

Download all files from an FTP server

This example uses Alpakka FTP to download files from an FTP server.

Fetch CSV via HTTP and publish to Kafka

This example uses Akka HTTP to send the HTTP request and Akka HTTP’s JSON support to convert the map into a JSON structure which gets published to a Kafka topic.

Examples using JMS

This example uses receives JMS messages with Alpakka JMS and sends those to different technologies.

Read from a database and write to Elasticsearch

This example uses Alpakka Slick to read from a relational database and write the data to Elasticsearch.

Read from Kafka and write to Elasticsearch

This example uses Alpakka Kafka to read from an Apache Kafka topic, parse the messages as JSON and write the data to Elasticsearch, committing offsets to Kafka after successfully updating Elasticsearch.

Read from Kafka and publish to websockets

Clients may connect via websockets and will receive data read from a Kafka topic.

Read files from a directory and write to Elasticsearch

This example uses Alpakka File to watch for new files created in a directory and then tails them (similar to Elasticsearch’s logstash utility). The tailed logs are parsed and indexed in Elasticsearch using Alpakka Elasticsearch.

Rotate logs, zip and write to SFTP server

Read a stream of data and store it zipped in rotating files on an SFTP server.

Subscribe to MQTT and produce to Kafka

Subscribe to an MQTT topic with Alpakka MQTT, group a few values and publish the aggregate to a Kafka topic with Alpakka Kafka.

Amazon SQS

Listen to an Amazon SQS topic, enrich the message via calling an actor, publish a new message to SQS and acknowledge/delete the original message. (Java only)

MQTT topic triggers file download which is uploaded to AWS S3

Listen to a MQTT topic, download from the URL passed in the received message, and upload the data from that address to AWS S3. (Java only)

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.