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

Support Record as Payload #343

Open
hantsy opened this issue Jan 16, 2025 · 2 comments
Open

Support Record as Payload #343

hantsy opened this issue Jan 16, 2025 · 2 comments

Comments

@hantsy
Copy link

hantsy commented Jan 16, 2025

When I upgraded my Cargotracker fork to Jakarta EE 11, I encountered an issue with JMS: If the record does not implement Serializabile, it will throw an exception when the message payload is a record or includes a record field.

A simple Serializable requirement is unreasonable for modern applications.

We must consider global message codecs(which support JSON, Cbor, Probuff, XML, etc.) and type converters(which convert between different types) for HTTP and message protocols to unite the behaviors and allow developers to apply them to the current REST, Websocket, Messaging, Faces, etc.

I think the first step is to unite the message codecs in WebScoket and JMS and make the message payload encode/decode configurable.

@m-reza-rahman
Copy link

For context, currently ObjectMessage requires a Serializable payload. I think the suggestion here is to look to modernize message body conversion. There is a related idea suggested here some time ago: #243 (comment).

@hantsy
Copy link
Author

hantsy commented Jan 21, 2025

@m-reza-rahman I hope Jakarta EE 12 will consider the message definition(headers or properties, body or payload), codecs(high-level encode/decode as JSON, XML, Corb, Probuff, etc), and type conversion(for body property) for message-like specs, such as WebSocket, JMS, and future gRPC, in the common spec(in the Jakarta issues, and maillist, I saw the discussion of this, but never created a proposal for it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants