Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protobuf MessageConverter in spring-messaging for use with STOMP #24022

Closed
onlybytes opened this issue Nov 19, 2019 · 6 comments
Closed

Protobuf MessageConverter in spring-messaging for use with STOMP #24022

onlybytes opened this issue Nov 19, 2019 · 6 comments
Assignees
Labels
in: messaging Issues in messaging modules (jms, messaging) status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@onlybytes
Copy link

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 DefaultStompSession class and use it.

Is there any other easier way?

How to use protocol buffers with Spring Messaging?

Thanks,
Strive

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 19, 2019
@rstoyanchev
Copy link
Contributor

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.

@rstoyanchev rstoyanchev added in: messaging Issues in messaging modules (jms, messaging) status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 19, 2019
@rstoyanchev rstoyanchev added this to the 5.x Backlog milestone Nov 19, 2019
@rstoyanchev rstoyanchev changed the title Sending protobuf ByteString through StompSession send() Protobuf MessageConverter in spring-messaging for use with STOMP Nov 19, 2019
@onlybytes
Copy link
Author

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

@jhoeller jhoeller reopened this Nov 20, 2019
@parviz-93
Copy link
Contributor

Could i take this task ?

@rstoyanchev
Copy link
Contributor

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

parviz-93 added a commit to parviz-93/spring-framework that referenced this issue Nov 26, 2019
@parviz-93
Copy link
Contributor

parviz-93 commented Nov 26, 2019

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

parviz-93 added a commit to parviz-93/spring-framework that referenced this issue Nov 27, 2019
@rstoyanchev rstoyanchev added status: superseded An issue that has been superseded by another and removed status: ideal-for-contribution An issue that a contributor can help us with labels Nov 27, 2019
@rstoyanchev rstoyanchev removed this from the 5.x Backlog milestone Nov 27, 2019
@rstoyanchev
Copy link
Contributor

This is now superseded by #24087.

parviz-93 added a commit to parviz-93/spring-framework that referenced this issue Nov 28, 2019
Kvicii pushed a commit to Kvicii/spring-framework that referenced this issue Nov 30, 2019
…amework into read_yuyang

* 'master' of https://github.com/spring-projects/spring-framework:
  Allow ExchangeStrategies customizations in WebClient
  Delete unused JdbcTemplate fields in examples
  Polish BatchPreparedStatementSetter example in reference manual
  Fix examples for <tx:method/> settings in reference manual
  Enable reading from the remote build cache for all
  Introduce Checkstyle rule to prohibit class names ending with "Test"
  Polishing contribution
  Improve getMultipartContentType in mock request.
  Polishing contribution
  spring-projects#24022 - added protobuf MessageConverter
  Polish StringArrayPropertyEditor[Tests]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants