These are chat archives for akkadotnet/AkkaStreams

26th
Jun 2017
Sean Farrow
@SeanFarrow
Jun 26 2017 10:24

I've got the following scala code:

object SqsSink {

/**

  • Scala API: creates a sink based on [[SqsFlowStage]] for a SQS queue using an [[AmazonSQSAsync]]
    */
    def apply(queueUrl: String, settings: SqsSinkSettings = SqsSinkSettings.Defaults)(
    implicit sqsClient: AmazonSQSAsync
    ): Sink[String, Future[Done]] =
    SqsFlow.apply(queueUrl, settings).toMat(Sink.ignore)(Keep.right)
    }
    Given the Sink type is sealed, what is the equivalent in Akka.net?
Marc Piechura
@marcpiechura
Jun 26 2017 10:54
Apply methods can mostly be translated to a static Create method, so as consumer you can call SqsSink.Create(parameter) and get the actual Sink back
You can take a look at the static methods of the Sink class , e.g. Sink.Ignore<TItem>()
Sean Farrow
@SeanFarrow
Jun 26 2017 12:37
So do we not create sink crasses directly? All the tests (it's the alpakka sqs code fyr) seem to be on the synk.
Marc Piechura
@marcpiechura
Jun 26 2017 12:47
The SqsSink is constructed via the SqsFlow + Sink.Ignore, so in this case yes, you don't need to create a Sink class but that doesn't mean you never need to
But if you need to, your Sink implementation extends IGraphStage<SinkShape<TIn>> and not the Sink class directly
Boban
@bobanco
Jun 26 2017 18:19
@Silv3rcircl3 , i have intialy ported alpaka amqp connector, but i see this connector has been updated recently in JVM
my question is does anyone needs amqp connector so i can update it based on the recent changes
which looks like many things being fixed in that update
Marc Piechura
@marcpiechura
Jun 26 2017 18:21
Let's say it this way, out of my head I haven't heard of any, but maybe they need it when they see it's there 😜
And we would love to see more connectors showing up developed by the community
Boban
@bobanco
Jun 26 2017 18:46
sounds like a plan :smile: i will port the new changes once i get free time
Marc Piechura
@marcpiechura
Jun 26 2017 18:49
Cool 👍