It is not possible to edit/clear some properties. We need to call clearProperties method as described here to get write access :
Once a message is produced (sent), its properties become read-only; the properties cannot be changed. While consumers can read the properties using the property accessor methods (getProperty( )), they cannot modify the properties using any of the mutator methods (setProperty( )). If the consumer attempts to set a property, the mutator method throws a javax.jms.MessageNotWriteableException.
Once a message is received, the only way its properties can be changed is by clearing out all the properties using the clearProperties( ) method. This removes all the properties from the message so that new ones can be added. Individual properties cannot be modified or removed once a message is sent.