hi Allard/Steven,
- i’m using Axon 4.2, where i used MongoTokenStore to restrict replaying events when i restart my application containing saga.
- but i need retry to be happened when i get runtime exception.
- if i use MongoTokenStore retry is not happening.
- i want retry to happen for runtime exceptions and i don’t want replaying all events when i restart my application.
below is my code snippet to store MongoTokenStore. can u suggest if any configuration is missed for retry to happen but not replay to happen.
public MongoTokenStore tokenStore(MongoClient client) {
MongoTokenStore.Builder builder = new MongoTokenStore.Builder();
builder.mongoTemplate(DefaultMongoTemplate.builder().mongoDatabase(client).build());
builder.serializer(JacksonSerializer.defaultSerializer());
return builder.build();
}
This is the token store created in my db.
<i>{
"_id" : ObjectId("5ee9c93f34f5634e643c0e5a"),
"processorName" : "TestManagementSagaProcessor",
"segment" : 0,
"owner" : "14XXX@XXXXXXXX",
"timestamp" : NumberLong(1592381197632),
"token" : { "$binary" : "eyJ0aW1lc3RhbXAiOjE1OTIzODA3NzQuNzE3MDAwMDAwLCJ0cmFja2VkRXZlbnRzIjp7IjAwZDJjY2E1LWM0ZGMtNDE3Mi04NGY3LWZjOTMzYWQ0MjgyYiI6MTU5MjM4MDc3NDY3OSwiMDdhODY3NGMtODU5ZC00NzliLThiMGUtMWZhYmQ0NzE1ZDQ3IjoxNTkyMzgwNzc0NzE3fX0=", "$type" : "00" },
"tokenType" : "org.axonframework.extensions.mongo.eventsourcing.eventstore.MongoTrackingToken"
}</i>
Any suggestion may be helpful.
Thanks
Siddu