Unable to connect Mongo

Hi All ,

Currently I am using axon-mongo-extension axon 4.1 . Please any one having the @Configuration in java using MongoEventStorageEngine.builder().mongoTemplate(axonMongoTemplate).build() . But still I am unable to connect to Mongo .

Can any one share the piece of code to connect Mongo . Please find the below code

@Bean

public MongoTemplate axonMongoTemplate(MongoClient client) {

return new DefaultMongoTemplate(client, mongoDB);

}

@Bean

public EventStorageEngine eventStorageEngine(){

return new MongoEventStorageEngine(axonMongoTemplate());

}

/Saranga

Hi Saranga,

You should be a little more specific with your problem description.
So please, in the future, take care with how you formulate the problem at hand.

It would be valuable to know what exactly happens.

Do you get a stack trace?

Do you see the storage engine connecting to the Mongo instance?

Or are you missing the key to connecting your storage engine to the Event Store?

So again, be mindful of how you draft a question.
This only costs more time to dive in to what you are actually trying to achieve.

Cheers,
Steven