Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
schrepfler
@schrepfler:matrix.org
[m]
when autogenerating the jpa tables I get sequence_offset bigint but it needs to be of bytea, is there anywhere where this is managed declaratively?
(can this be because my id's are UUID's?)
Bett B.K.
@bettbenard

Having problems implementing pac4j-lagom (java) OAuth in my project:

Configure your OAuth 2 library with your client_id, client_secret, and redirect_uri. Tell it to use https://launchpad.37signals.com/authorization/new to request authorization and https://launchpad.37signals.com/authorization/token to get access tokens

Patrick Culligan
@pculligan

Hi Team; I've hunted the internet, this channel, and have yet to find a clue, so here goes:

Kafka Server closed unexpectedly.

...has become the bane of my existence. I am 100% sure it's not a problem in lagom 1.6.4, but in my use of it. It's possible it's this machine (maybe it's been crippled somehow by IT). However I need to get to the bottom of it.

  • There is no folder "log4j_output" at <your-project-root>/target/lagom-dynamic-projects/lagom-internal-meta-project-kafka/target/log4j_output
  • There is no error reported by runAll above that "closed" message.
  • I have deleted the <your-project-root>/target/lagom-dynamic-projects/lagom-internal-meta-project-kafka folder in case it was zookeeper.
  • I have done sbt clean
  • I have done this in Java 8 and 11.

Might I ask advice on tracking this down?

4 replies
schrepfler
@schrepfler:matrix.org
[m]
SDKMan ❤️
Joe Koberg
@jkoberg
Has anyone struggled with this: Reams and reams of akka cluster logs.... each line hundreds of characters long, printing constantly.... but when your app doesn't work, there's zero information available about what may be going wrong
Database call might be failing, but zero logging that says so
No information about why actors may not have responded to a message
schrepfler
@schrepfler:matrix.org
[m]
Yes
Joe Koberg
@jkoberg
any hints on config changes ?
I have basic entity behavior that's not working, and nothing to go on. Messages just disappear. It really looks bad to my boss
schrepfler
@schrepfler:matrix.org
[m]
Not really, at the moment it’s touch and go. I definitely agree it would be nice if there would be more errors bubbling up if something happens at any stage of the workers lifecycle with more detail
Remember to put logging in your code at least so that you know where in the flow you are
Also put some metrics in place, maybe invest in cinnamon or Kamon, that can sometime identify actor processing times although not sure if it works with Lagom
Nathan Ostgard
@noonat
I'm attempting to tweak the consistency settings, and I've tried setting both cassandra-query-journal.eventual-consistency-delay and akka.persistence.cassandra.events-by-tag.eventual-consistency-delay in my <x>-impl/src/main/resources/application.conf files. However, when I start the service with sbt runAll, I still see akka.persistence.cassandra.query.EventsByTagStage logs saying "starting with EC delay 5000ms", and the timing doesn't seem to have changed at all for events being picked up in my read-side processor. Any suggestions as to what I might be doing wrong?
3 replies
Fredrick Oluoch
@menty44
hey guys
am getting this error
Caused by: com.datastax.driver.core.exceptions.ServerError: An unexpected error occurred server side on /127.0.0.1:4000: java.lang.UnsupportedOperationException: can't get field offset on a hidden class: private final org.apache.cassandra.db.ClusteringComparator org.apache.cassandra.db.ClusteringComparator$$Lambda$157/0x0000000800d891e0.arg$1
after running mvn lagom:runAll
please advice
Nishchal Kutarekar
@nishchalk

Hi All,
I'm using shopping-cart example from lagom-samples. While running on single node cluster I observe that, on making multiple concurrent requests akka.actor.default-dispatcher count (observed from visualVM) keeps increasing (proportional to concurrent requests) and they remain in PARK state even after request is served.

is this an expected behaviour? How do we control this and reuse the same actors or kill the actors after request has been served.

schrepfler
@schrepfler:matrix.org
[m]
going back to my UUID question, I can see in lagom-persistence-jdbc-core that sequebceOffset is defined as column[Option[Long]]
(reference: com.lightbend.lagom.internal.persistence.jdbc.SlickOffsetStore.OffsetStore), when I run my read side on postgresql this fails and I need to drop the table and convert from bigint into bytea, can this be because my key's are UUID and using the native postgres uuid type?
    @Id
    @Type(type="pg-uuid")
    private UUID eventId;
SynappsGiteau
@SynappsGiteau
Hello everyone,
We have been using Lagom in production for a few months and we would like to optimize several things:
  • (Most importantly) RAM usage (for obvious cost reasons)
  • the startup time of the services
  • the warm-up time of the services (related to the JIT compilation)
    We would like to know if it is possible with Lagom (and if someone has already explored this topic) to use the Image Native technology with GrallVM, or to configure another ahead-of-time (AOT) compilation mechanism
    For information, we run our services on a Kubernetes environment.
    Thanks for your feedback
3 replies
schrepfler
@schrepfler:matrix.org
[m]
Congratulations on the release!
manavgupta08
@manavgupta08
Hi All, each of my lagom services in production are making millions of queries per couple of hours to cassandra. That leads to huge cost and cassandra running out of resources(outage). Any idea what part of Lagom is making these queries ? and how to reduce/manage frequency of these queries ?
2 replies
manavgupta08
@manavgupta08
is Lagom dead ? I don't see much action or response from lightbend team on this forum or elsewhere. I have invested quite a bit to build production app for my start up . I am bit worried .
7 replies
Vincent Canuel
@vcanuel
Thanks for the enlightenment, I think Lagom could also improves its current stack with features like ‘saga pattern’ implementation
2 replies
bhcblc683
@bhcblc683

ok weird, PersistentEntityRegistry needs to be injected into the service implementation even though nothing calls it, or else the error above is encountered

this bug cost me about 6 hours, is there any try to make an explanation? fuck!!!

1 reply
schrepfler
@schrepfler:matrix.org
[m]
can I use akka-discovery-config directly for a local deployment 2 lagom services that talk to each-other via the api interface?
2 replies
schrepfler
@schrepfler:matrix.org
[m]
Hi, we're having some nasty stuff around deserializing messages over pub-sub, has anyone seen something like this?
prices-service-6fd9b54cb4-8flx7 prices-service 14:43:09.499 [r-11] [error] c.l.l.i.b.k.KafkaSubscriberActor [akkaAddress=akka://application@172.31.241.173:25520, sourceThread=application-akka.actor.default-dispatcher-5, akkaSource=akka://application@172.31.241.173:25520/user/KafkaBackoffConsumer1-price-commands/KafkaConsumerActor1-price-commands, sourceActorSystem=application, akkaTimestamp=14:43:09.498UTC] - Topic subscription interrupted due to failure: [java.util.concurrent.CompletionException: java.lang.ClassCastException: class scala.collection.immutable.HashMap cannot be cast to class prices.api.Price (scala.collection.immutable.HashMap and prices.api.Price are in unnamed module of loader 'app')]
`
I've seen @timmoore once comment something around jackson and giving it hints to the objectmapper
lapidus79
@lapidus79
How can I manually decode the message column from the database when I use jdbc persistance (postgres) and json serialization? Pure hex decode will not work out of the box. Seems that data is somehow wrapped?
How exactly is the event serialized?
@schrepfler:matrix.org do you use Lagom 1.6.5?
1 reply
Levi Ramsey
@leviramsey
IIRC, in Lagom, there are at least some cases where it gzips json for persistence (or at least it supports doing that)
lapidus79
@lapidus79
@leviramsey It seems that what I have is basically hex, however when decoding both the beginning and the end of the dataset looks strange..
Is the actual event payload somehow wrapped in somekind of object containing metadata?
lapidus79
@lapidus79
Hmm seems that the message column is not only the serialized json of the actual EntityEvent object but also contains metadata such as the full EntityEvent class name
lapidus79
@lapidus79
We’ve gone with making the generic Confirmation<T> that extends Reply<T> (which we took out of the samples, so I’m puzzled how come other people didn’t notice it as well) to concrete ConfirmationConcreteReplyClass and that solved our issue. Not ideal but decided to go with it rather that block the project.
Michael Ahlers
@michaelahlers
I know you can safely not emit messages to a Topic from an entity's events, but is it safe to emit more than one for each event? If there's a definitive answer for this in the documentation, I'm missing it. :sweat_smile:
rfkeith
@rfkeith
Hello, can anyone suggest how I would broadcast a command to a list of persistent entities in Lagom. I know their actors under the hood so was hoping I could do something with an ActorSelection but wanted to know if Akka Persistence Typed provided a more idiomatic way of achieving this?
10 replies
Kyle Florence
@solarmosaic-kflorence
I'm using Akka Persistence Typed for the first time in a new service that's being used in integration tests. When I start up the service, I get an error: Caused by: javax.naming.NameNotFoundException: DefaultDB not found -- it seems that I have to make a non-lazy reference to persistentEntityRegistry to make this error go away, but the Lagom 1.6.x docs don't seem to indicate I need to use this anymore anywhere (previously I remember having to do persistentEntityRegistry.register(entity)) -- is that still needed even though it's missing from the docs? https://www.lagomframework.com/documentation/1.6.x/scala/UsingAkkaPersistenceTyped.html -- note that I do see the persistentEntityRegistry being included in the service impl class on that page, but since I never needed it in my service I didn't put it there.
2 replies
Dheeraj Karande 🇮🇳
@dheerajkarande_twitter
how can i get the ip address from where the request is send
Sriram Sundharesan
@sriramsundhar
hey!! am new to lagom.. am trying to use it in GCP with pub-sub as message broker... is there any example or samples I can look into?
schrepfler
@schrepfler:matrix.org
[m]
did anyone notice any issues with akka-management http endpoint not starting up, maybe on latest lagom, 1.6.5?
schrepfler
@schrepfler:matrix.org
[m]
found it, wasn't binding to 0.0.0.0 so localhost curl was failing
Simiil
@Simiil
Hi, I just ran into the problem that the first-time-bucket is set too far back. After looking through the logs and the offset-store tables, it seems that some parts always use this timestamp. I built a small service that has an entity with tagged events , a read side, and defines a topic. After adding some events and restarting the services, there is always at least one line in the logs like: starting with EC delay 0ms: fromOffset [51e38000-b8fe-11eb-8080-808080808080 (2021-05-20 00:00:00:000)] toOffset [None] (the time is my currently configured first-time-bucket). I am curious what part of lagom causes this, and why there is no correct offset is used. Can you explain this behaviour?
schrepfler
@schrepfler:matrix.org
[m]
the reference documentation is kind of exclusive on how to package lagom between sbt or maven. In our case we use maven to build our system but were not quite happy with how we could build/dockerize our apps so a hybrid way is possible, add a separate sbt project which simply references the -impl services and uses the LagomJava plugin to build the universal packages
lazy val aService = (project in file("s"))
  .enablePlugins(LagomJava)
  .settings(
    resolvers += ...,
    maintainer += ...,
    libraryDependencies ++= Seq(
      "..." % "...-impl" % "..."
    )
  )