You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
there is a problem in your Java examples, that obtain an encoded content of a string as a byte-array via java.lang.String.getBytes():byte[] method. This may lead to a poison message, which makes your whole queue not readable and results in an error (bad_utf8_character_code) looking like this example:
=ERROR REPORT==== 7-May-2015::15:59:37 ===
** Handler sockjs_cowboy_handler terminating in websocket_info/3
for the reason exit:{ucs,{bad_utf8_character_code}}
** Message was go
** Options were {service,"/stomp",#Fun<rabbit_ws_sockjs.1.120271989>,{},
"http://cdn.sockjs.org/sockjs-0.2.js",false,true,
5000,25000,131072,#Fun<rabbit_ws_sockjs.0.116551930>,
undefined}
.... and so on.
The call of string.getBytes() method uses by default "Charset.defaultCharset()" or "ISO-8859-1" which could produce an incompatible byte-sequence and make it impossible to retrive a queued message.
We would advice to change all calls of string.getBytes() to string.getBytes("UTF-8") in existing examples to force usage of a compatible string encoding.
How to reproduce: publish a message with the following content "Läuft alles?" into a queue using your examples and then try to retrieve this message.
Hi,
there is a problem in your Java examples, that obtain an encoded content of a string as a byte-array via
java.lang.String.getBytes():byte[]
method. This may lead to a poison message, which makes your whole queue not readable and results in an error (bad_utf8_character_code) looking like this example:.... and so on.
The call of string.getBytes() method uses by default "Charset.defaultCharset()" or "ISO-8859-1" which could produce an incompatible byte-sequence and make it impossible to retrive a queued message.
We would advice to change all calls of string.getBytes() to string.getBytes("UTF-8") in existing examples to force usage of a compatible string encoding.
How to reproduce: publish a message with the following content "Läuft alles?" into a queue using your examples and then try to retrieve this message.
Debian, RabbitMQ 3.5.1, SockJS + Stomp
Greetz, Andre.
The text was updated successfully, but these errors were encountered: