I'm doing something like that for now:
.map({ x => x.foldLeft("")((fStr, str) => fStr + str + "\r\n") })
but this ends up in many json in one kafka message, and what I'd like to
achieve is having one json per message being pushed to kafka
On Monday, September 7, 2015 at 3:53:38 PM UTC+2, Konrad Malawski wrote:
>
> Why not .map(json => makeTheString(json))?
> On Sep 7, 2015 13:30, "Ivan Baisi" <[email protected] <javascript:>>
> wrote:
>
>> Hi all,
>>
>> So I have a problem I cannot find out how to solve.
>>
>> I have a flow that receives many elements, and as I have to access a db
>> with that data, I have to group them so I query the db once instead of 1000
>> times:
>>
>> deleteActivityFlow.grouped(1000)
>>
>> The problem is that after doing all the processing required, I end up
>> with a Seq[String] that represent the domain event in a json format I have
>> to push to the kafka Sink:
>>
>> Sink(kafka.publish(producerProperties))
>>
>> This sink expects a String, not a Seq[String], so I was wondering if
>> there's any way of achieving this grouped(1000) inverse
>>
>> Thanks in advance!
>>
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.