Skip to content
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

Error: Unexpected ACK received for message-id. How to resolve? #110

Open
PradeepNooney opened this issue Sep 21, 2020 · 2 comments
Open

Comments

@PradeepNooney
Copy link

PradeepNooney commented Sep 21, 2020

The message is getting processed again and again after unexpected ack error in a loop, increasing the message count abnormally.
I heard we can fix this by
"The ACK frame MUST include an id header matching the ack header of the MESSAGE being acknowledged."
https://stackoverflow.com/questions/29958801/error-while-acknowledging-stomp-message
https://stackoverflow.com/questions/54382457/stomp-ack-is-yielding-error-unexpected-ack-received-for-message-id
as of now i'm sending ack like this
activeMQ.currentClient.ack(message)
what else do i need to add ?

error message [MSG: ActiveMQ onSubscribe : subscribe error Unexpected ACK received for message-id [ID:N5066.local-53943-1600669795622-3:404:-1:1:1]]

below end to end code sample formate i'm using:
const queueHeaders = {
'destination': '/queue/sample',
'ack': 'client-individual'
};
client.subscribe(queueHeaders, onSubscribe)

onSubscribe: function(error, message) {
if (error) {
logger.log('error', 'ActiveMQ onSubscribe : subscribe error ' + error.message);//getting error
return;
}
message.readString('utf-8', async function(error, body) { await onReadMessage(error, body, message); });
},
onReadMessage: async function(error, body, message) {
if (error) {
logger.log('error', 'ActiveMQ onReadMessage : read message error ' + error.message);
return;
}
let mqData = JSON.parse(body)
await process(mqData);
activeMQ.currentClient.ack(message);
},

@coder5492
Copy link

Can someone please comment on this, I am facing a similiar issue

@loretoparisi
Copy link

I'm also facing the same issue in case of disconnect and reconnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants