threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

Allow the client/SDK to set the message UID #47

Closed sameh-farouk closed 2 years ago

sameh-farouk commented 2 years ago

I think it is better for the official client/SDK to handle generating UID for messages, IMO it is important for the sender to be aware of the message UID, in cases like he wants to send two messages to the same twin dest and then wait for both responses on the same ret queue.

now when responses return, the client has no way to distinguish which response belongs to which message.

order can not be granted, as messages are sent with multi workers, also network routes can vary between the two requests.

so if we don't want to limit the client's ability to receive multi responses on the same return queue, we need to allow the client to set the message UID, then he can check this UID on the reply.

muhamadazmy commented 2 years ago

The use case you are already discussing is already possible. Please note the following