jakartaee / jakartaee/platform

Consider United Messaging Model

Open
#1,024 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

EE13
Dominant language
No language data
Stars
230
Forks
77
Avg merge
8d 5h
Merged PRs (30d)
1

Description

Currently, Jakarta Messaging has its own text and binary message definition, and WebSocket supports InputStream, String, StringReader, etc. We can get the inspiration from Spring framework, Spring Integration, etc to unite the messaging model.

Use headers/body or properties/payload to describe a message at runtime.

```java
record Message(Map headers, T body){}
```

With the message conversion #1023 support, in Jakarta Messaging and WebSocket, we can use a simple type-safe approach to get the message payload directly.

Jakarta Messaging and WebSocket can adapt the Message to simplify the development for developers. In WebSocket lifecycle hook methods or Jakarta messaging listener methods, it can accept the message headers and payload as parameters directly.

```java
public void onMessage(
@Headers Map headers,
@Payload MyObject payload
)

public void onMessage(Message message)

public void onMessage(MyObject payload) // none `Message` type, it is a payload directly

```

And `headers` and `payload` should be available in the Jakarta Messaging Lisneter `selector` EL as described in https://github.com/jakartaee/messaging/issues/243#issuecomment-2569877617

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the proposed model in this issue, the message-conversion work in #1023, and the referenced Jakarta Messaging discussion. Determine the specification changes needed for Jakarta Messaging and WebSocket adaptation, listener parameters, and selector EL access; done requires an agreed unified model and defined behavior across those APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.