[#1377] oid, cid: Upgrade SDK package

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-12 19:37:46 +03:00 committed by LeL
parent f65898a354
commit f15e6e888f
118 changed files with 1455 additions and 886 deletions

View file

@ -49,9 +49,14 @@ func (n *Writer) Notify(topic string, address *addressSDK.Address) error {
return errConnIsClosed
}
id, ok := address.ObjectID()
if !ok {
return errors.New("missing object ID in object address")
}
// use first 4 byte of the encoded string as
// message ID for the 'exactly once' delivery
messageID := address.ObjectID().String()[:4]
messageID := id.EncodeToString()[:4]
// check if the stream was previously created
n.m.RLock()