azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

the date set on the message is not sent over as a brokerproperty

Open joostdenijs opened this issue 14 years ago • 4 comments

Dev estimate: 3 Test estimate: 0.5

Moved from the private repo.

Initial Issue: Message m = new Message("test"); m.setDate(new Date(0L)); service.sendQueueMessage(queuename,m);

Actual: Brokerproperties doesn't contain the date time set POST https://deepakv.servicebus.windows.net/myq/messages 8 > BrokerProperties: {} 8 > Authorization: WRAP access_token

Expected: brokerproperty to have the datetime set

Comments: For me for the following code it didn't send the date (this issue was assigned to check the issue if only with 0L )

Nov 30, 2011 1:51:34 PM com.sun.jersey.api.client.filter.LoggingFilter log INFO: 5 * Client out-bound request 5 > POST https://javasdksb.servicebus.windows.net/myq/messages 5 > Content-Type: text/xml 5 > BrokerProperties: {"MessageId":"1","Label":"fakelable","ReplyTo":"[email protected]"} 5 > name: "test" 5 > Authorization: WRAP access_token="net.windows.servicebus.action=Listen%2cManage%2cSend&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fjavasdksb-sb.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fjavasdksb.servicebus.windows.net%2f&ExpiresOn=1322691083&Issuer=https%3a%2f%2fjavasdksb-sb.accesscontrol.windows.net%2f&HMACSHA256=6ITFPCwhpyocKb5RzddKkip2xw%2b0ddFCpTVweJl9x9s%3d" Firstmessage information

BrokeredMessage message = new BrokeredMessage(issueBody);

message.setDate(new Date(40000));

This still repros with the following QueueInfo q = new QueueInfo(); q.setPath("test4"); service.createQueue(q); BrokeredMessage message = new BrokeredMessage("test"); message.setDate(new Date(0L));

service.sendQueueMessage(Sender.queuename, message);

Jul 11, 2012 2:29:37 PM com.sun.jersey.api.client.filter.LoggingFilter log INFO: 2 * Client out-bound request 2 > POST https://javasdksb.servicebus.windows.net/myq/messages 2 > BrokerProperties: {} 2 > Authorization: WRAP access_token="net.windows.servicebus.action=Listen%2cManage%2cSend&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fjavasdksb-sb.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fjavasdksb.servicebus.windows.net%2fmyq%2fmessages&ExpiresOn=1342043377&Issuer=https%3a%2f%2fjavasdksb-sb.accesscontrol.windows.net%2f&HMACSHA256=oHiOv9YD70p%2bwOEBbB9hKupulWqfj3DnEqq0Ld6h6fo%3d" test

joostdenijs avatar Jul 16 '12 21:07 joostdenijs

The date of the returning message is set using the Date header of the message. This value is set by the server.

gcheng avatar Jul 16 '13 20:07 gcheng

if setting date on the client side even does not make sense, then current behavior actually makes sense.

gcheng avatar Jul 16 '13 20:07 gcheng

according to this documentation, date is not present as a field that should ever been sent to service bus, thus current behavior is totally correct. http://msdn.microsoft.com/en-us/library/windowsazure/hh780718.aspx

we should close it as won't fix.

gcheng avatar Jul 16 '13 20:07 gcheng

close this won't fix issue

xuezhai avatar Aug 02 '13 22:08 xuezhai