stan.py icon indicating copy to clipboard operation
stan.py copied to clipboard

Retrieve GUID from subscription msg

Open ShahNewazKhan opened this issue 4 years ago • 3 comments

Is there a method to retrieve the guid that is returned when you publish the message on the subscription end?

ShahNewazKhan avatar Sep 09 '19 15:09 ShahNewazKhan

Look at: https://github.com/nats-io/stan.py/blob/master/stan/aio/client.py#L390

The PubAck object is returned when you publish a message and there should be a guid field in it.

smitfrank avatar Sep 10 '19 07:09 smitfrank

Look at: https://github.com/nats-io/stan.py/blob/master/stan/aio/client.py#L390

The PubAck object is returned when you publish a message and there should be a guid field in it.

Thanks for the feedback @smitfrank, however I was was asking about being able to retrieve it from the subscription end. Does any of these attributes hold the guid when the subscrition recieves the msg.

https://github.com/nats-io/stan.py/blob/master/stan/aio/client.py#L291-L295

ShahNewazKhan avatar Sep 10 '19 08:09 ShahNewazKhan

It doesn't look like he Msg object holds a reference to the guid available to the publisher https://github.com/nats-io/stan.py/blob/master/stan/aio/client.py#L695-L718

ShahNewazKhan avatar Sep 10 '19 08:09 ShahNewazKhan