Token_Entry collection not created in mongodb


I’m new to axon framework and trying to make a POC for event replay using springboot and mongoDB. I was able to replay the events successfully but then I can’t find any token_entry collection created in my MongoDB. Could someone help me to take a look. It seems a very simple question, but I just couldn’t find any topic on this. My configuration as below.

# mongo
# mongodb.username=
# mongodb.password=

public class AxonConfiguration {

    private String mongoUrl;

    private String mongoDbName;

    private String eventsCollectionName;

    private String snapshotCollectionName;
    public Serializer axonJsonSerializer() {
        return new JacksonSerializer();

    public void configure(EventHandlingConfiguration config) {
        config.registerTrackingProcessor("merchantProcessor"); // default all processors to tracking mode.

    public EventStorageEngine eventStorageEngine(){
        return new MongoEventStorageEngine(axonJsonSerializer(),null, axonMongoTemplate(), new DocumentPerEventStorageStrategy());

    @Bean(name = "axonMongoTemplate")
    public MongoTemplate axonMongoTemplate() {
        MongoTemplate template = new DefaultMongoTemplate(mongoClient(), mongoDbName, eventsCollectionName, snapshotCollectionName);
        return template;

    public MongoClient mongoClient(){
        MongoFactory mongoFactory = new MongoFactory();
        mongoFactory.setMongoAddresses(Arrays.asList(new ServerAddress(mongoUrl)));
        return mongoFactory.createMongo();


Hi Bin,

Axon Framework currently doesn’t provide a Mongo TokenStore, so I’d guess that’s why you don’t see any tokens being stored.
There is however a PR open for it, scheduled for Axon 3.1.
If you need it right now, you can take a look there how Joris solves the issue.

Hope this helps!



Hi Steven,

Thanks very much for the information! Could you share the link to Joris’ solution though?


That’s the PR Steven referred to: