jakartaee / jakartaee/messaging

New method Message.copyMessage() to create a mutable copy of a received message

Open
#58 6 comments 0 reactions 0 assignees View on GitHub
New Feature pd20-forreview-major Priority: Major
Dominant language
Java
Stars
49
Forks
34
PR merge metrics
No merged PRs in 30d

Description

javax.jms.Message is mutable when first created.
On a TextMessage you can set for example 'the text'.You can also set properties.
However, after receiving a message, setting a property does not work anymore before clearing the properties explicitly
This means that if you want to re-send the same message + extra properties, you need to read them, store temporary, clear message and set them again.

Suggestion is to foresee somekind of copy constructor, or another way of creating a new message from an existing one.
Another way could be to let the properties be mutable.
#### Affected Versions
[1.1]

Contributor guide

Open the contributing guide

Research direction

Start with the javax.jms.Message and TextMessage APIs and review how received messages become immutable while their properties are handled. Compare the proposed copy constructor or alternative creation method with allowing properties to remain mutable. Done requires an agreed API behavior for copying a received message, including its text and properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.