Package org.axonframework.test.saga
Interface GivenAggregateEventPublisher
public interface GivenAggregateEventPublisher
Interface to an object that publishes events on behalf of an aggregate.
Axon Framework 5 has no DomainEventMessage, so the aggregate type, aggregate identifier and sequence number
travel on the processing context rather than on the message. A Saga reads them as
AggregateType,
SourceId and
SequenceNumber handler parameters, which
is where Axon Framework 4 read them from the message. A handler declaring one of those is only invoked for an event
that has an aggregate, so an event published through FixtureConfiguration.givenAPublished(Object) does not
reach it.
- Since:
- 1.1
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionRegister the giveneventsas being published somewhere in the past.
-
Method Details
-
published
Register the giveneventsas being published somewhere in the past. These events are used to prepare the state of Sagas listening to them. Any commands or events sent out by the saga as reaction to these events is ignored.- Parameters:
events- The events published by the aggregate- Returns:
- a reference to the fixture to support a fluent interface
-