Azure / azure-service-bus-java

☁️ Java client library for Azure Service Bus
https://azure.microsoft.com/services/service-bus
MIT License
59 stars 58 forks source link

Message Id #69

Open sharadholani opened 7 years ago

sharadholani commented 7 years ago

The send function in MessageSender class has a void return type. Could a message Id be returned as a response to the send function ?

I know we can set our own message Id value before sending , but an acknowledgement containing message Id for the sent message would be more convenient.

While receiving a message , we are getting a message ID even if we did not set it explicitly while sending. This means that an Id is generated for every message which is sent. So why cant this id be sent as a response to send function ?

SQS and Storage Queue does return a message ID as response to send message functions.

yvgopal commented 7 years ago

Didn't get to it in time. Id is an application property, to be set by the application. ServiceBus sets an ID as default, only if the application doesn't set its own ID. SB clients never returned ID from the SEND call. I don't want to comment on other Queue service providers. In service bus, if a send call completes without any error means the message is sent, no need to any acknowledgements. I don't see much value in returning a message id. And it also adds a new SEND api. I will still defer it to our PM team to evaluate this. But I am not creating a ticket for now.