Measure RPM with a discrete component?
Gyroscopes are designed for this - measurement of angular velocity on a rotating body without needing a separate stationary component.  I recommend a MEMS gyroscope.  Several are available with analog or digital outputs (SPI or I²C). They are usually specified in degrees per second -- 150 RPM is 900°/second, which is high but still readily available.  It sounds like a 1-axis gyro is all you require; nowadays 3-axis gyros seem to be somewhat more common; they would be fine too, since you could just ignore the other 2 axes.

Regarding the other options you were thinking about:

The downside of a compass is that it will likely only work well for vertical rotation.  They can also have problems with nearby iron or motors. They are usually designed to measure angular position, not velocity.  I doubt you could easily measure 150 RPM with a compass.

To measure angular velocity with an accelerometer, you would have to mount it on the shaft away from the center and measure the centripetal acceleration.  This could work assuming the distance from the center is great enough and controlled enough to get the precision you require, but that may be hard if the axle is narrow. Any additional linear acceleration on the whole axle would need to be accounted for .