try {
consumerManager = app.getMetaData(CONSUMER_MANAGER_KEY);
if (consumerManager == null) {
consumerManager = new ConsumerManager();
consumerManager.setAssociations(new InMemoryConsumerAssociationStore());
consumerManager.setNonceVerifier(new InMemoryNonceVerifier(10000));
app.setMetaData(CONSUMER_MANAGER_KEY, consumerManager);
}
} catch (ConsumerException e) {
throw new RuntimeException("failed to create ConsumerManager", e);
}