STOMP plug-in change in RabbitMQ 3.5.4

Version 3.5.4 of the RabbitMQ open source message broker introduced a change in the STOMP plug-in to improve compatibility with the PHP STOMP extension. Unfortunately this change breaks client applications which do not expect additional newline characters after the end marker of a STOMP frame.

Habari Client libraries are affected by this change, so a workaround is required to access a RabbitMQ 3.5.4 broker.

Important: with this workaround, the Habari Client library will not be compatible with older versions of RabbitMQ.

For Internet Direct (Indy)

function TBTCommAdapterIndy.ReadFrame(...
  ...
    ReadFrameEndByteAfterContentLen(ContentLen);
    // add this line for RabbitMQ 3.5.4 
    ReadMessageBufferLen(IndyTCPClient.IOHandler, 1, DataTimeout);
  end;
end;

For Synapse

function TBTCommAdapterSynapse.ReadFrame(...
  ...
    ReadFrameEndByteAfterContentLen(ContentLen);
    // add this line for RabbitMQ 3.5.4
    SynTCPClient.RecvTerminated(LINE_SEP, ATimeOut)
  end;
end;
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s