I've solved my own issue - here's a breakdown of why it was occurring.
ActiveMQ assumes that any incoming STOMP message with a content-length
header is a ByteMessage and any without that header is a TextMessage (reference material).
Ruby's stomp gem tries to take account of this, but the header encoding method they've implemented breaks their own tests for a custom header: :suppress_content_length
, which does what it says on the tin.
I've forked & modified their code to fix this - see my stomp repo - which hopefully they'll fold in soon enough.