-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated Acknowledgements with SetBody() #154
Comments
The setBody() thingie is there mostly if you need to publish as fast as possible, but in your case I would just create a new instance AMQPMessage instance. |
Hi, But reusing message body leads to repeated acknowledgements as I mentioned. And we can fix it, by storing cloned message into published_message array.
Or am I missing something? |
Closing due to inactivity, and due to workarounds in place. |
I checked issues list and didn't found related issue in list.
I am opening Channel in confirm_select() mode and then publishing a single message multiple times with different message bodies using setBody(). But I am getting acknowledgements with last sent message body.
Sample Code:
It will provide me 11 acknowledgements with message body 11.
We are storing message into published_messages array when we publish a message into exchange.
When we use setBody() function to change body of message it is changing message body of published_message array. (Due to by reference objects passing in PHP5 which keeps reference of message body).
Cloning $msg and then saving into published_message worked for me.
Can you look into this?
The text was updated successfully, but these errors were encountered: