You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "bcaw-ofeer (via GitHub)" <gi...@apache.org> on 2025/07/31 02:39:40 UTC

[I] [Enhancement] Enhance MessageImpl to allow subclasses to access properties [rocketmq-clients]

bcaw-ofeer opened a new issue, #1057:
URL: https://github.com/apache/rocketmq-clients/issues/1057

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.
   
   
   ### Programming Language of the Client
   
   Java
   
   ### Summary
   
   Enhance MessageImpl to allow subclasses to access properties
   
   
   ### Motivation
   
   Currently, MessageImpl.properties is private and getProperties() returns a new HashMap copy. This prevents inheritance-based access to properties and creates unnecessary object allocations. Making properties protected allows subclasses to access the properties map directly, while returning an unmodifiable map prevents external modifications while avoiding object creation overhead.
   
   ### Describe the Solution You'd Like
   
   1. Change MessageImpl.properties visibility from private to protected
   2. Modify getProperties() to return Collections.unmodifiableMap(properties) instead of new HashMap<>(properties)
   
   This change enables:
   - Inheritance-based access to properties in subclasses
   - Immutable view of properties to prevent external modifications
   - Better performance by avoiding unnecessary HashMap allocations
   - Maintains backward compatibility while improving extensibility
   
   ### Describe Alternatives You've Considered
   
   None
   
   ### Additional Context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Enhancement] Enhance MessageImpl to allow subclasses to access properties [rocketmq-clients]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1057: [Enhancement] Enhance MessageImpl to allow subclasses to access properties
URL: https://github.com/apache/rocketmq-clients/issues/1057


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Enhancement] Enhance MessageImpl to allow subclasses to access properties [rocketmq-clients]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1057:
URL: https://github.com/apache/rocketmq-clients/issues/1057#issuecomment-3239630345

   This issue is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Enhancement] Enhance MessageImpl to allow subclasses to access properties [rocketmq-clients]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1057:
URL: https://github.com/apache/rocketmq-clients/issues/1057#issuecomment-3251203913

   This issue was closed because it has been inactive for 3 days since being marked as stale.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org