[rabbitmq-discuss] Publishing binary data using the java client
Matthias Radestock
matthias at rabbitmq.com
Sat Jan 12 17:04:58 GMT 2013
Christian,
On 12/01/13 14:41, Christian Strack wrote:
> for benchmarking purposes i have set up a an astract testing suite to
> transfer data using several transport implementations. The transmitted
> data are integers converted to byte arrays using ByteBuffer. While the
> en- and decoding of these data is successful using UDP sockets, the
> decoding fails when being transmitted using rabbitmq and the rabbitmq
> java libraries. The results are just random bytes but the array size is
> correct. I have tried to set the encoding to different BasicProperties
> which had no impact. Is there a flag that needs to be set to prevent
> that rabbitmq alters the data? Below are the important snippets of my code.
The RabbitMQ server does not touch the message body. So this is either a
problem with your code or, far less likely, the client library.
I cannot see anything obviously wrong with the snippet you sent, but
since it's only a snippet the error is probably elsewhere. So please
submit a complete, self-contained program that publishes and consumes a
single byte[] message and exhibits the problem.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list