# Impact of Modifying Message Body Before Acknowledgment with persistent\_message\_receiver.ack()

**URL:** <https://community.solace.com/t/impact-of-modifying-message-body-before-acknowledgment-with-persistent-message-receiver-ack/2112>\
**Category:** Solace Event Broker\
**Tags:** python, solacepubsub\
**Created:** [January 20, 2025, 4:12am UTC](https://community.solace.com/t/impact-of-modifying-message-body-before-acknowledgment-with-persistent-message-receiver-ack/2112 "2025-01-20T04:12:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hobart](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@hobart](https://community.solace.com/u/hobart)\
**Post date:** [January 20, 2025, 4:12am UTC](https://community.solace.com/t/impact-of-modifying-message-body-before-acknowledgment-with-persistent-message-receiver-ack/2112/1 "2025-01-20T04:12:42Z")

</div>

I have a question regarding the `persistent_message_receiver.ack()` method.

According to the documentation,

> **[solace.messaging.receiver package — Solace PubSub+ API For Python 2024...](https://docs.solace.com/API-Developer-Online-Ref-Documentation/python/source/rst/solace.messaging.receiver.html#module-solace.messaging.receiver.persistent_message_receiver)**

,when I acknowledge a message, I need to attach the message as a parameter. In our use case, the message body may be modified before acknowledging. I would like to know if this will cause any issues that might result in the acknowledgment failing.

If this is the case, is there a solution to still acknowledge the message even if some of its content has been modified?

Thanks

Hobart

---

<div class="post-metadata">

**Author:** ![Tamimi](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/tamimi/32/2190_2.png) [@Tamimi](https://community.solace.com/u/Tamimi)\
**Post date:** [January 24, 2025, 10:51pm UTC](https://community.solace.com/t/impact-of-modifying-message-body-before-acknowledgment-with-persistent-message-receiver-ack/2112/2 "2025-01-24T22:51:32Z")

</div>

Hey @hobart - can you provide more details on how the message body might be altered before acknowledging the message? There are no setters to be called on the InboundMessage and you cant modify the payload as per the documentation here:

> **[solace.messaging.receiver package — Solace PubSub+ API For Python 2024...](https://docs.solace.com/API-Developer-Online-Ref-Documentation/python/source/rst/solace.messaging.receiver.html#solace.messaging.receiver.inbound_message.InboundMessage)**

The only way you would pass a different message with a different payload is to create a new outboud message where you set a different payload, in which case it is a _different_ message and you wont be use it to acknowledge another message. Hopefully this helps
