support configurable duplicate key handing