-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port imports and dependencies of CSV Samples to Pekko #6
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Alpakka: HTTP CSV to Kafka | ||
Pekko Connectors: HTTP CSV to Kafka |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Alpakka sample | ||
# Pekko Connectors sample | ||
|
||
## Fetch CSV via Akka HTTP and publish the data as JSON to Kafka | ||
## Fetch CSV via Pekko HTTP and publish the data as JSON to Kafka | ||
|
||
This example uses @extref[Akka HTTP to send the HTTP request](akka-http:client-side/connection-level.html#opening-http-connections) and Akka HTTPs primary JSON support via @extref[Spray JSON](akka-http:common/json-support.html#spray-json-support) (for Scala) or Jackson JSON (for Java) to convert the map into a JSON structure which gets published to a Kafka topic. | ||
This example uses @extref[Pekko HTTP to send the HTTP request](pekko-http:client-side/connection-level.html#opening-http-connections) and Pekko HTTPs primary JSON support via @extref[Spray JSON](pekko-http:common/json-support.html#spray-json-support) (for Scala) or Jackson JSON (for Java) to convert the map into a JSON structure which gets published to a Kafka topic. | ||
|
||
Browse the sources at @link:[Github](https://github.com/akka/alpakka-samples/tree/master/alpakka-sample-http-csv-to-kafka) { open=new }. | ||
Browse the sources at @link:[Github](https://github.com/apache/incubator-pekko-connectors-samples/tree/main/pekko-connectors-sample-http-csv-to-kafka) { open=new }. | ||
|
||
To try out this project clone @link:[the Alpakka Samples repository](https://github.com/akka/alpakka-samples) { open=new } and find it in the `alpakka-sample-http-csv-to-kafka` directory. | ||
To try out this project clone @link:[the Pekko Connectors Samples repository](https://github.com/apache/incubator-pekko-connectors-samples) { open=new } and find it in the `pekko-connectors-sample-http-csv-to-kafka` directory. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,21 @@ | |
|
||
package samples | ||
|
||
import akka.Done | ||
import akka.actor._ | ||
import akka.http.scaladsl._ | ||
import akka.http.scaladsl.model.StatusCodes._ | ||
import akka.http.scaladsl.model.headers.Accept | ||
import akka.http.scaladsl.model.{ HttpRequest, HttpResponse, MediaRanges } | ||
import akka.stream._ | ||
import akka.stream.scaladsl.{ Sink, Source } | ||
import akka.util.ByteString | ||
import org.apache.pekko.Done | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @reypader Pekko uses a root nested imports style, that is import org.apache.pekko
import pekko.Done
import pekko.actor._
etc etc Would you be able to update the PR to this style for all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've been trying to play around with my formatters and scalafmt. I copied over scalafmt from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you have a similar thread on this specific topic apache/pekko#414 Since this project is separate from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Regarding scalafmt, this can be done later. For now I would just manually do the change I suggested |
||
import org.apache.pekko.actor._ | ||
import org.apache.pekko.http.scaladsl._ | ||
import org.apache.pekko.http.scaladsl.model.StatusCodes._ | ||
import org.apache.pekko.http.scaladsl.model.headers.Accept | ||
import org.apache.pekko.http.scaladsl.model.{ HttpRequest, HttpResponse, MediaRanges } | ||
import org.apache.pekko.stream._ | ||
import org.apache.pekko.stream.scaladsl.{ Sink, Source } | ||
import org.apache.pekko.util.ByteString | ||
|
||
import scala.concurrent.Future | ||
|
||
object Main extends App { | ||
|
||
implicit val actorSystem = ActorSystem("alpakka-samples") | ||
implicit val actorSystem = ActorSystem("pekko-connectors-samples") | ||
|
||
import actorSystem.dispatcher | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add back
<logger name="org.apache.pekko.kafka.benchmarks" level="INFO"/>
?