Reputation: 2779
I need to send a binary message to Message Broker using the perl library Net::Stomp::Client
. But whenever I send a message using the send
or send_with_receipt
methods, the message is received as a Text message.
I'm using ActiveMQ
in my server, and when I call consume, the received message is of type TextMessage
. I need it to be of type BytesMessage
.
Update:
I see in this link that setting the content-length header will set the type to Bytes message... But I didn't find any example using Net::Stomp::Perl... If anyone can provide an example it would be great...
Upvotes: 0
Views: 268
Reputation: 2779
I solved this by adding bytes_message => 1
to the send()
method
In newer versions you need to use stomp 1.1 or greater (default is 1.0) (pass version
or accept_version
to the stomp client constructor) and higher and set the content-type
Upvotes: 1