PartitionKeyMethodResolver resolver = new PartitionKeyMethodResolver();
MessagePartitionKeyPropertyAccessor accessor = new MessagePartitionKeyPropertyAccessor();
context.addMethodResolver(resolver);
context.addPropertyAccessor(accessor);
Expression expression1 = parser.parseExpression("payload");
Expression expression2 = parser.parseExpression("timestamp");
for (int i = 0; i<1000000; i++) {
expression1.getValue(context, message, String.class);
expression2.getValue(context, message, Long.class);
}
}