Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 26 2020 07:39
    patriknw labeled #29767
  • Oct 26 2020 07:39
    patriknw labeled #29767
  • Oct 26 2020 07:39
    patriknw labeled #29767
  • Oct 26 2020 07:39
    patriknw labeled #29767
  • Oct 26 2020 07:38
    patriknw commented #29767
  • Oct 26 2020 07:07
    patriknw commented #29765
  • Oct 26 2020 06:56
    patriknw commented #25468
  • Oct 26 2020 06:30
    wtfiwtz starred akka/akka
  • Oct 26 2020 04:31
    YunSeongKim7 starred akka/akka
  • Oct 25 2020 16:21
    nitikagarw commented #25468
  • Oct 25 2020 09:22
    fubiao starred akka/akka
  • Oct 25 2020 05:09
    saguywalker starred akka/akka
  • Oct 24 2020 21:47
    tt4n starred akka/akka
  • Oct 24 2020 21:20
    akka-ci commented #29672
  • Oct 24 2020 21:05
    dope9967 commented #29672
  • Oct 24 2020 21:03
    akka-ci commented #29672
  • Oct 24 2020 21:03
    akka-ci unlabeled #29672
  • Oct 24 2020 21:03
    akka-ci labeled #29672
  • Oct 24 2020 20:44
    dope9967 synchronize #29672
  • Oct 24 2020 20:31
    akka-ci unlabeled #29672
learnerjava830
@learnerjava830

Five Cases Of Encoding - Which One is Best Approach

I have a password which has plus value in the front and fails or missed out when it is sends as a request parameter. On reading/searching internet i observed we can solve the problem via the following

a. encode in front-end - (ex: https://stackoverflow.com/questions/53546691/preserving-plus-sign-in-urlencoded-http-post-request)
b. encode in back-end - (ex: extends ClientHttpRequestInterceptor and add functionality)
c. convert the password to base64url in front-end and pass and do the decode in the back-end
d. send the password in request body instead of request parameter
e. send the hash value instead of actual value as hash will not have any plus or special characters

Thanks

learnerjava830
@learnerjava830
What is the best open source tool/software for performance verfiying to identify performance bugs in Java?
davidlzs
@davidlzs
Hi, we are using akka-projection/akka-persistence-jdbc/MySQL and event-sourcing, we have an app with millions rows of journal/event in the event-journal table, now we would like to rebuild our read-model by using these journals, we reset the projection offset to 1, however, we see the events-by-tag SQL never returns, does anybody know what workaround/configuration to make the events-by-tag start to process events when we have huge gap between the start offset and the max ordering in the event-journal when using akka-persisatence-jdbc? Thanks for your help. Here is the events-by-tag SQL query never finishes:
SELECT 
    s19.`ordering`,
    s19.`deleted`,
    s19.`persistence_id`,
    s19.`sequence_number`,
    s19.`writer`,
    s19.`write_timestamp`,
    s19.`adapter_manifest`,
    s19.`event_payload`,
    s19.`event_ser_id`,
    s19.`event_ser_manifest`,
    s19.`meta_payload`,
    s19.`meta_ser_id`,
    s19.`meta_ser_manifest`
FROM
    `event_journal` s19,
    `event_tag` s20
WHERE
    ((s20.`tag` = 'tag')
        AND ((s19.`ordering` > 1) -- start offset
        AND (s19.`ordering` <= 11499546))) -- max ordering in event_journal
        AND (s19.`ordering` = s20.`event_id`)
ORDER BY s19.`ordering`
LIMIT 5000
2 replies
Thundzz.
@Thundzz
Hello akka community,
I have a question regarding the SQS connector of alpakka.
From our testing, it seems that the buffering mechanism of the SQSSource makes it so that there will always be at least one "in-flight" message that is not yet pushed to the downstream stream.
We've tested many configurations and setups but were unable to disable this behavior, is anyone aware of a way of preventing this from happening ?
Just to give some context, we consider this to be a problem because in a scenario where we have multiple instances of the same consumer, it means that the buffered message is made unavailable to other potentially available consumers.
learnerjava830
@learnerjava830

Text Over Image with Java Web Application

https://www.baeldung.com/java-add-text-to-image
https://www.geeksforgeeks.org/java-program-to-add-text-to-an-image-in-opencv/

I want to display an image in the web application where user can add text on the image.

Finally i need to save in DB, later user has to view the editable text and edit if required

How to achieve this in java web application - UI? back-end? DB (json or image or co-ordinates) ?

Does any opensource can be used in all the levels? Can someone suggest some comments/feedback

Arunkumar
@arunak18
Actor Cluster Slowness when Large size messages produced by a ShardRegion proxy.
We implemented Akka clustering with cluster sharding for a use case.
When we doing load testing for that, We created 1000 entity actors in a Node by cluster Sharding.(Cluster Node)
And we sends messages to that entity actors from a Proxy Node (Shard Region Proxy on other Node).
I explained in details on this question https://stackoverflow.com/questions/73795971/actor-cluster-slowness-when-large-size-messages-produced-by-a-shardregion-proxy Your valuable comments will help me so much
Arunkumar
@arunak18
@leviramsey @patriknw @mdedetrich @johanandren Sorry to disturb . Can you help on the above question??
Alessandro D'Armiento
@adarmiento

Hello!
I have an issue that is bugging me a lot.
I am using Akka Streams to model dynamic linear streams: Source -> Flow -> Sink.

I need to model the case of having 1 producer and N consumer, using multiple linear streams

Imagine the use case of having a Sink that produce on a Kafka queue, and N sources that consume from that Kafka topics (with different consumer groups)
But everything in memory
Since I am forced to keep using multiple linear streams, I cannot use the broadcast operator of the GraphDSL, and since we build the the streams at runtime based on user requests, I can't access materialized value to use actor interoperation and build my own broadcast.
I explained more in details and added a graph in this StackOverflow question: https://stackoverflow.com/questions/73800537/akka-streams-how-to-model-1-producer-n-consumers-linar-streams
Any help would be highly appreciated
learnerjava830
@learnerjava830

URL url = new URL(...); --> FAILS here when i try to download a https image - "javax.imageio.IIOException ... "Can't get input stream from URL!""

Note:
URL works from browser
URL works in standalone program
URL fails when used in java web application

Question:

  1. Is any special treatment required to access https image from web app?
  2. How does it works in standalone program but not via web app though the certs are not installed in local machine?

What is the correct/right approach and what is the underlying differences?

Thanks

Arunkumar
@arunak18
:point_up: September 21, 2022 11:31 AM anyone??
Arunkumar
@arunak18
How to configure send and receive buffer when using artery remoting ?
Primordium
@Primordium

Hi all, I'm trying to use a dependency that adds Kinesis KPL support to akka. It has a KPLFlow class to provide that support. I'm relativly new to akka and flows, but my objective would be to have a kafka source, that is already created and have some type of sink, to replace the "native" kinesis sink and use this flow to deliver the records. Is there a way to extract from the flow class this? Or is it possible with just the flow "consume" from the kafka source and deliver to a target stream ?

I've create a stackoverflow question regarding this https://stackoverflow.com/questions/73873966/akka-kafka-source-to-kinesis-sink-using-kpl

HarshDaryani896
@HarshDaryani896
Hey, I am trying to run end to end example given in the akka-persistence-cassandra on alma linux but on running "sbt -Dconfig.resource=local.conf -Dakka.cluster.roles.0=write run" I am getting this error: 'object actor is not a member of package akka'. how can I run the example?
watimuma
@watimuma
Hi~How to use Alpakka-ElasticSearch realize paging search?
6 replies
Abbey
@Casperlet
sharding.init(Entity(entityKey)(createBehavior)) should create entities dynamically. but how to pass the entityId to the apply()?
nathanccleung
@nathanccleung
Hi everyone, i currently am developing the clustersharding application, in there i need to query the active actors in the cluster sharding. As i know that the akka doc leading me to send a message(GetClusterShardingStats) to the shards. However i couldn't find any workable example. do anyone can share the example code to me?
Collignon-Ducret Rémi
@miton18
Hello ! How can I intercept actor's message and responses this is for tracing purpose :-)
3 replies
brabo-hi
@brabo-hi
hello guys, is akka compatible with oracle jdk 11? i am getting the following error when using it Caused by: com.typesafe.config.ConfigException$UnresolvedSubstitution: application.conf @ jar:
Patrik Nordwall
@patriknw
@/all Umbrella release 22.10 of Akka is out. Check out the new features and improvements in https://akka.io/blog/news/2022/10/26/akka-22.10-released
1 reply
Levi Ramsey
@leviramsey
@brabo-hi Akka is compatible with JDK11... that exception shouldn't have anything to do with JDK11
1 reply
kerr
@hepin1989
It's now JDK 1&
now akka support JDK 17:)
brabo-hi
@brabo-hi
Hi guys, i have an akka http server that receives a websocket server connection, how can i connect this connect to an external websocket. basically having both akka http server + akka http client.
basically this server will only be used a connector to two websocket connections and act as ws server and ws client
        path("ws") {
          val flowExternal: Flow[Message, Message, Any] = ???
          val flowInternal: Flow[Message, Message, Any] = ???
          Http().singleWebSocketRequest(WebSocketRequest("ws://127.0.0.1:port/internal"), flowInternal)
          handleWebSocketMessages(flowExternal)
        }
bjenkinsgit
@bjenkinsgit

Akka-HTTP: I'm trying to code a graceful failure from basicAuthentication and have tried wrapping my call to basicAuthentication like so:

val routes = handleRejections(totallyMissingHandler) { concat (
    (pathPrefix("admin")) {
       authenticateBasic(realm = "secure site", myUserPassAuthenticator) { userName =>
        welcomeuser(userName)  
      }
    }, ....etc...

and have a rejection handler totallyMissingHandler like so:

implicit def totallyMissingHandler = RejectionHandler.newBuilder()
  .handleNotFound { complete(StatusCodes.NotFound, "Oh man, what you are looking for is long gone.") }
  .handle { case AuthenticationFailedRejection(msg, _) => complete(StatusCodes.Unauthorized, msg.toString()) }
  .result()

and when I go to the protected path (ex. localhost:8080/admin) the .handle code gets triggered IMMEDIATELY and not when my authentication fails. Can someone help me out here?

2 replies
Digvijay Singh
@digvijay7
Hi folks, I have a use case where we need to close connections on the server regularly. Is there some setting to close client connections? Also, wondering if there is a way to close the connections gracefully, using Connection: Close header? I see akka-http handles that during service shutdown already.
johnpawleysky
@johnpawleysky
hi everyone. I'm working with flatMapMerge in Akka Streams and have it configured currently with a breadth of 5. What I seem to be seeing is that none of the sub sinks are materialized until 'breadth' substreams have been created. I'm running local tests but can't replicate this behaviour well locally, apologies. Does anyone know if this some kind of optimisation with the FlattenMerge graph stage? The substreams take a reasonably long time to run, but given I don't think they're materialized until later I don't think this should be an issue. The flow is also very low throughput, meaning this issue causes quite a long delay in message processing. For flows with more throughput the breadth fills quickly and then the flow seems to process incoming messages 'normally' for a while, i.e. as it receives them.
skestle
@skestle
I want to populate a nexus repo to take to an offline environment with akka, alpakka (and play). I've found https://github.com/lightbend/akka-dependencies which is awesome - is there anything similar for alpakka modules?
skestle
@skestle
...or even just a list of all the module dependency names?
Gerret Sanders
@GerretS

I got tripped up yesterday by Source.future(). The scaladoc states:

Send the single value of the Future when it completes and there is demand. If the future fails the stream is failed with that exception.

That's true, but if the future fails, the stream supervisor is never triggered and that caused an issue in my code. I'm just wondering if that's expected behavior and if that's documented anywhere.

3 replies
tsungyong
@tsungyong

hey everyone, I'm using Akka Persistence and Projections, but I've got a read-after-write problem that I'm looking for ideas on. For certain business/front end reasons, after a certain write where an event is persisted and the state is updated, I need to block until that event is read by the projection so that the read side is synchronized.

One way this was approached was to add the data we need as part of the state of the event sourced actor, and expose a command that gets the state of the actor, but that's less than ideal. Does anyone have other ideas on approaching this?

spoofer
@TopSpoofer
when i use 'parameters' func to get the query params like: parameters("from".as[Int], "size".as[Int]), if the size is: '10<iframe src=javascript:alert(1953)>', it will output the message to browser:HTTP/1.1 400 Bad Request connection: close server: ResourceManagement content-length: 124 X-Powered-By: Express date: Wed, 16 Nov 2022 03:10:35 GMT content-type: text/plain; charset=UTF-8 The query parameter 'size' was malformed: '10<iframe src=javascript:alert(1953)>' is not a valid 32-bit signed integer value
spoofer
@TopSpoofer
how can i handle this error message? i don't want to output this message to browser, Because it causes some loophole.
raboof
@raboof:matrix.org
[m]
@TopSpoofer: you can register a custom RejectionHandler and handle rejections without exposing such details. This particular rejection is the MalformedQueryParamRejection but you might want to have a generic one.
5 replies
Eduardas Kazakas
@kamiKAZIK
Greetings, can somebody point me in the right direction how can I update the akka persistence event_journal. I have tried to implement some basic event sourced actor, but I would like to migrate from JSON serialization to Protobuf. There are plenty of examples how to use PersistentQuery for journal reading, but almost no examples how to do some write changes for the journal. There are modules like akka-gdpr, akka-persistence-update-jdbc, but these commercial modules. What I have figured out so far is that there should be some sort of journal actor that could probably be used for persisting data in event_journal.
Patrik Nordwall
@patriknw
@kamiKAZIK There is a migration tool in the new akka-persistence-r2dbc plugin. Maybe you can use that for inspiration. https://github.com/akka/akka-persistence-r2dbc/blob/main/migration/src/main/scala/akka/persistence/r2dbc/migration/MigrationTool.scala
jvanheesch
@jvanheesch
Hey all. I'm currently reading 'Akka in action' and I have a question regarding Akka FSMs.
Transitions can be monitored internally and externally (https://doc.akka.io/docs/akka/current/fsm.html#monitoring-transitions)
  • internal: onTransition(handler)
  • external: SubscribeTransitionCallBack
    My questing: when using onTransition, is the action executed sync or async? I.e.: can the onTransition logic lag behind the state changes, or is onTransition guaranteed to be executed before a possible next state change is triggered?
kannar
@KannarFr
Hi, I'm consuming an external queue to run HTTP requests. Sometimes these requests receive Timeouts INFO akka.actor.LocalActorRef - Message [akka.actor.ReceiveTimeout$] to Actor[akka://OVDRootSystem/system/IO-TCP/selectors/$a/8#-66797564 6] was not delivered. [1] dead letters encountered. Instead of let akka retying I want to Nack the message from the queue and let the external redeveliver the message further to retry. I can't find how to properly handle this case. Any tips?
4 replies
Francisco Lopez-Sancho
@franciscolopezsancho

Dear hakkers,

We are happy to announce the 2.0.0-M1 release of Akka Diagnostics which is the continuation of Akka Enhancements. This release is the first milestone leading up to version 2.0.0 of Akka Diagnostics.

Akka Diagnostics 2.0.0-M1 contains:

  • The Thread Starvation Detector.

Happy hakking!

– The Akka Team

Arne Claassen
@sdether
Is there a way to extract path segments or use PathMatcher outside of the request context? I.e. I'm using Url for my internal representation and frequently need to inspect their Path to get at specific segments, but have found no good way of doing so. Since it has head and tail I was hoping there would be a simple way to turn it into List[String] but so far no luck
cheapsolutionarchitect
@cheapsolutionarchitect
Hi, is it possible with Alpakka connecting to Cassandra to use a custom profile (datastax-java-driver config) or set the consistency level per session?
cheapsolutionarchitect
@cheapsolutionarchitect