question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Review AkkaTaggerAdapter's API

See original GitHub issue

We have recently introduced the AkkaTaggerAdapter, but we may need to reconsider if we should pass the EntityContext or simply a String.

The method that is defined as:

def fromLagom[Event <: AggregateEvent[Event]](
  entityCtx: EntityContext,
  lagomTagger: AggregateEventTagger[Event]
): Event => Set[String]

The main reason we chose to pass the EntityContext is that we can then make sure that we will use EntityContext.entityId when generating the virtual partition numbers.

However, that puts a constraint on how one can initialize the EventSourcedBehavior and that has an impact on testing as it requires EntityContext on tests.

We should reconsider this. Maybe the method signature should be:

def fromLagom[Event <: AggregateEvent[Event]](
  entityId: String,
  lagomTagger: AggregateEventTagger[Event]
): Event => Set[String]

Anyway, I just want to raise the flag, so we tackle that before we cut the first RC.

@ignasi35, since you have been experimenting with testing and Akka Persistence Typed, please dump here all your thoughts.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dwijnandcommented, Nov 4, 2019

We’ll need to address this later, quite probably on Akka’s side. For now we’ll keep EntityContext, which favours some more type-safety at the cost of some lack of ergonomics (having to use null for the sharing actor, in tests).

0reactions
octonatocommented, Nov 4, 2019

And, in the java implementation in particular, we won’t even need a private EntityContext entityContext field.

We won’t need a private EntityContext, but we will need a private entityId. We will need to fill it at construction time using the passed EntityContext. We can’t use the PersistenceId because we will need to parse it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AkkaTaggerAdapter (Lagom Services API)
Adapts an existing Lagom AggregateEventTagger to a function Function<Event, Set<String>> as expected by Akka Persistence Typed EventSourcedBehavior.withTagger ...
Read more >
Review Scraper API - Datashake
Review Scraper API. An API to use reviews in your apps with no scraping, headless browsers, maintenance or technical overhead required. Get Reviews....
Read more >
The Augmented API Design Reviewer - YouTube
Arnaud Lauret, NatixisAPI Design Reviews can be a total nightmare when it comes to check API Design Guidelines conformance.
Read more >
Review Scraper API - Product Hunt
An API to use reviews in your apps with no scraping, headless browsers, maintenance or technical overhead required. We return a standard JSON...
Read more >
playframework-1.x Search Results - Githubissues
Lagom Version 1.3.1 ### API Java ### Operating System (Ubuntu 16.04) ... [x] Review AkkaTaggerAdapter's API [lagom#2390](https://github.com/lagom/lagom/p…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found