Ack on messages with TCP/protobuf

Hi there,

I am working on implementing persistent subscriptions feature for this package So far I’ve got everything working apart from acknowledging the messages.

I keep getting retries regardless of the message ack - which I am 90% sure is correct (sending event ids is not that difficult).

I am providing correct correlationId and correct subscription id (stream::group_name).

However, I just get retries all the time. Is there any way to see if ES actually acked the message?


Add a log here:

btw a likely candidate might the uuid formatting (they are in a weird
wire format) see

Would you mind explaining (only briefly) the way UUID is formatted?

That code explains it (and its only for correlation id)

Ah ok, so it doesn’t affect incoming event UUIDs for the ack command?

If so, that is already handled by the lib because I am able to write events.

Also running ES in docker, so would have hard time logging. Was hoping for an obvious mistake - will dig deeper.


I can assure you that acks work though (as the other clients all seem
to work :))

For all future visitors to this post, the problem was indeed in the formatting of the UUID. Any UUID sent to ES via TCP/protobuf interface has to be converted to WTF UUD (love the naming) :slight_smile:

Simple example of conversion in JS:

var convertUuidToWtf = function(uuid) {
    var hex = uuid.replace(/-/g, '');
    var guid = hex.substring(6, 8) + hex.substring(4, 6) + hex.substring(2, 4) + hex.substring(0, 2) + "-" +
        hex.substring(10, 12) + hex.substring(8, 10) + "-" +
        hex.substring(14, 16) + hex.substring(12, 14) + "-" +
        hex.substring(16, 20) + "-" +
    return guid;





This is fairly hard to notice (at least for me) in any debugging output because I am quite used to scanning lots of data for just the end part of what I am looking for.

Thanks Greg Young for replies