Add support for checking duplicate messages