I've got a Shimano 105 RD that says max cog size is 27t, and I have been runnng a (IRD) cassette with a 30t cog for the last 5000 miles without any issues at all. As previously stated, there are several considerations, such as the geometry of your frame/hanger, and the size of the large/small front rings that you intend to run.
Also, a SRAM cassette will work fine with a Shumano rd. I interchange Shimano, SRAM and IRD cassettes with the 105 RD without any issues.