Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1362

Unexpected Some(ByteString()) instead of String

$
0
0

@IvoAdrian wrote:

Hi there,

when developing an Akka Streams Application, I constructed my Stream step by step and have a Sink with println at the End. This approach worked well, as it showed me the content of the items arriving at the end of the stream. Now suddenly the println doesn’t print the passed Strings, instead it prints the following structure: Some(ByteString())
e.g.:
Some(ByteString(57, 55, 99, 56, 98, 55, 102, 55, 45, 97, 98, 49, 100, 45, 52, 53, 101, 51, 45, 97, 100, 53, 51, 45, 53, 51, 55, 97, 53, 102, 97, 97, 51, 100, 53, 100))

I suspect Akka Streams converted my Strings into Option[ByteString], but in the Signatures it is not visible.

Before the following code, It worked perfectly.

    .splitWhen(_.window_changed)
    .fold(CampaignWindowTimeCount(0L, Map(): Campaign2CountMap))((accu, campaignAndWindowChange) =>
      CampaignWindowTimeCount(campaignAndWindowChange.key.window_time, count(accu.campaign_2_count_map, campaignAndWindowChange.key.campaign_id)))
    .mergeSubstreams

It may have something to do with the created Subflow.

What do you guys think?

Thanks a lot!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1362

Trending Articles