Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lastSequenceNr accessible from PersistentBehavior #25113

Closed
pawelkaczor opened this Issue May 17, 2018 · 2 comments

Comments

Projects
5 participants
@pawelkaczor
Copy link
Contributor

commented May 17, 2018

While lastSequenceNr is exposed by the untyped PersistentActor, it is missing in the typed PersistentBehavior.

For logging purposes I would like to access lastSequenceNr from within a callback function registered as a side Effect in PersistentBehavior:

public abstract class Eventsourced<C, E, S> extends PersistentBehavior<C, E, S> {
	protected Effect<E, S> persist(ActorContext<C> ctx, E event) {
		return Effect().persist(event).andThen(s -> logEvent(ctx, event));
	}
}
@patriknw

This comment has been minimized.

Copy link
Member

commented May 21, 2018

That's a good point. Wonder how we should support that? Do we have to make a special PersistentActorContext?

@ktoso

This comment has been minimized.

Copy link
Member

commented May 21, 2018

Separate PersistentActorContextmay be some additional "meh" work but would feel the most natural 👍

pawelkaczor added a commit to pawelkaczor/akka that referenced this issue May 22, 2018

pawelkaczor added a commit to pawelkaczor/akka that referenced this issue Jun 1, 2018

@patriknw patriknw added this to In Progress in Akka Typed Jun 4, 2018

@patriknw patriknw added 3 - in progress and removed 1 - triaged labels Jun 4, 2018

@patriknw patriknw moved this from In Progress to Reviewing in Akka Typed Jun 5, 2018

@patriknw patriknw moved this from Reviewing to In Progress in Akka Typed Jul 13, 2018

@patriknw patriknw moved this from In Progress to Backlog in Akka Typed Nov 26, 2018

@patriknw patriknw moved this from Backlog to Ready for production backlog in Akka Typed Dec 11, 2018

@helena helena self-assigned this Jan 8, 2019

@helena helena removed their assignment Jan 14, 2019

@johanandren johanandren self-assigned this Jan 18, 2019

@johanandren johanandren moved this from Ready for production backlog to In Progress in Akka Typed Jan 18, 2019

@johanandren johanandren moved this from In Progress to Reviewing in Akka Typed Jan 31, 2019

@patriknw patriknw added this to the 2.5.22 milestone Mar 6, 2019

@patriknw patriknw closed this Mar 6, 2019

Akka Typed automation moved this from Reviewing to Done Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.