Breach of confidentiality
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake then delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
Liability for the unintentional transmission of computer viruses
WARNING: Although the MetaMagic Global has taken reasonable precautions to ensure no viruses are present in this email, MetaMagic cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Breach of confidentiality
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake then delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
Liability for the unintentional transmission of computer viruses
WARNING: Although the MetaMagic Global has taken reasonable precautions to ensure no viruses are present in this email, MetaMagic cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I am using Axon4.2 with Spring boot. Created simple saga. Its works well during Application running. However once it restarts, it re-runs the Saga again.
So Tried to use MongoSagaStore for persisting SgagStore, did not work. Below are code snippet. Please help.
@Configuration
public class AxonConfig {
@Bean
@Primary
public Serializer serializer() {
final XStream xStream = new XStream(new CompactDriver());
xStream.setClassLoader(this.getClass().getClassLoader());
return XStreamSerializer.builder().xStream(xStream).build();
}
@Bean
public MongoSagaStore sagaStore(MongoClient client) {
MongoSagaStore.Builder builder = new MongoSagaStore.Builder();
builder.mongoTemplate(DefaultMongoTemplate.builder()
.mongoDatabase(client).build());
return builder.build();
}
MySagaClass
@Saga(sagaStore = "sagaStore")
public class DepositSaga {
@Autowired MongoTemplate mongoTemplate;
@StartSaga
@SagaEventHandler(associationProperty = "depositId")
public void handle(DepositStartEvent depositStartEvent ) {
logger.info("Saga invoked deposit Start Event ");im getting Exception like this.2020-02-28 16:53:39.904 INFO 20040 --- [mandProcessor-0] com.deposit.DepositAggregate : Inside Deposit Start Command in DepositAggregate2020-02-28 16:53:39.904 INFO 20040 --- [mandProcessor-0] com.deposit.DepositAggregate : Firing Deposit Start Event in DepositAggregate2020-02-28 16:53:33.045 INFO 20040 --- [agaProcessor]-0] com.deposit.sagas.DepositSaga : Inside Saga Deposit Start Event in DepositSaga2020-02-28 16:53:39.904 INFO 20040 --- [mandProcessor-0] com.deposit.DepositAggregate : Inside Deposit End Command in DepositAggregate
2020-02-28 16:53:43.753 WARN 20040 --- [agaProcessor]-0] in.axon.TrackingEventProcessor: Error occurred. Starting retry mode.
To unsubscribe from this group and stop receiving emails from it, send an email to axonfr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
i modified MongoSagaStore. below is the code snipped and it worked for me.
we need use builder.serializer(JacksonSerializer.defaultSerializer()); then we wont get that exception.
@bean
public SagaStore sagaRepository(MongoClient mongoClient) {
MongoSagaStore.Builder builder = new MongoSagaStore.Builder();
builder.mongoTemplate(DefaultMongoTemplate.builder()
.mongoDatabase(mongoClient).build());
builder.serializer(JacksonSerializer.defaultSerializer());
return builder.build();
}
thanks
To view this discussion on the web visit https://groups.google.com/d/msgid/axonframework/ea9dfdc6-2c80-4318-b810-47fd325f3e6c%40googlegroups.com.