Hi,

I have created a ReactorNettyTcpStompClient to connect to RabbitMQ STOMP.

My requirement is to send protobuf ByteString to the destination queue. I tried with all the message converters that are available under org.springframework.messaging.converter package. Either i get MessageDeliveryException: nested exception is java.lang.ClassCastException or MessageConversionException: Unable to convert payload with....

I am thinking of overriding/overloading the send() method of DefaultStompSessionclass and use it.

Is there any other easier way?

How to use protocol buffers with Spring Messaging?

Thanks, Strive

Comment From: rstoyanchev

Currently there isn't a MessageConverter in spring-messaging for Protobuf. The spring-web module however has an ProtobufHttpMessageConverter and it wouldn't be too hard to copy the implementation of that in order create a MessageConverter equivalent.

Comment From: onlybytes

I created a converter that suits my needs (took a clue from ByteArrayMessageConverter). Definitely will have look at ProtobufHttpMessageConverter.

Thanks for adding this to 5.x backlog

Regards, Strive

Comment From: parviz-93

Could i take this task ?

Comment From: rstoyanchev

Yes, it is marked "ideal-for-contribution" and that means we've already identified it as something that should be straight-forward to address.

Comment From: parviz-93

Please check my PR #24087. I also added a question on which I need advice

Comment From: rstoyanchev

This is now superseded by #24087.