activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Gomes" <>
Subject Re: Using NMS to connect to OpenMQ via stomp
Date Thu, 25 Jun 2009 14:52:02 GMT
I think the fix sounds right. Without having looked at the code yet, would it make sense to
name the constant NULL_BYTE so it is clear how it should be used?

------Original Message------
From: matt walsh
To: ActiveMQ Dev
ReplyTo: ActiveMQ Dev
Subject: Using NMS to connect to OpenMQ via stomp
Sent: Jun 24, 2009 9:29 PM

Hi All,

I have had a problem connecting to OpenMQ via stomp using Apache NMS. It
seems the NMS code terminates stomp frames using a 'NULL' character (as per
the stomp spec), which is defined in the class StompFrameStream as follows

public const char NULL = (char) 0;

OpenMQ was giving me errors because it seems from my investigations that
this 'NULL' is infact a double byte character and is therefore sending 2
zeros at the end of a frame. This leaves an extra NULL lying around in the
stream that OpenMQ is unhappy with, breaking further commands sent for a

I have patched the NMS source to define NULL as a byte, ie

public const byte NULL = (byte) 0;

This makes the problem go away for OpenMQ.

I would like some advice on this. Is it acceptable for a Stomp frame to have
additional NULL characters lying around as NMS seems to be doing (and thus
is this a problem that should be dealt with by OpenMQ) or should NMS be
patched in a way similar to what I have done here?

I have attached my patched version of the 1.0 version of StompFrameStream. StompFrameStream.cs 
View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

- Jim
View raw message