{"action":"created","issue":{"url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/177","labels_url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/177/comments","events_url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/177/events","html_url":"https://github.com/noodlefrenzy/node-amqp10/issues/177","id":112710785,"number":177,"title":"can't set property absoluteExpiryTime on AMQP message","user":{"login":"damonbarry","id":9042469,"avatar_url":"https://avatars.githubusercontent.com/u/9042469?v=3","gravatar_id":"","url":"https://api.github.com/users/damonbarry","html_url":"https://github.com/damonbarry","followers_url":"https://api.github.com/users/damonbarry/followers","following_url":"https://api.github.com/users/damonbarry/following{/other_user}","gists_url":"https://api.github.com/users/damonbarry/gists{/gist_id}","starred_url":"https://api.github.com/users/damonbarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonbarry/subscriptions","organizations_url":"https://api.github.com/users/damonbarry/orgs","repos_url":"https://api.github.com/users/damonbarry/repos","events_url":"https://api.github.com/users/damonbarry/events{/privacy}","received_events_url":"https://api.github.com/users/damonbarry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T01:23:52Z","updated_at":"2015-10-22T02:36:15Z","closed_at":null,"body":"When I pass the following object to the `SenderLink.send` method:\r\n```javascript\r\nAmqpMessage {\r\n  properties: {\r\n    absoluteExpiryTime: 1445475982850,\r\n    to: '/devices/dlbtest01/messages/devicebound'\r\n  },\r\n  body: '\\'hello\\''\r\n}\r\n```\r\n...in the resulting message sent over AMQP the absoluteExpiryTime is `undefined`:\r\n```javascript\r\nMessage {\r\n  properties: Properties {\r\n    descriptor: [Int64 value:115 octets:00 00 00 00 00 00 00 73],\r\n    value: undefined,\r\n    to: '/devices/dlbtest01/messages/devicebound',\r\n    absoluteExpiryTime: undefined\r\n  },\r\n  body: <Buffer 27 68 65 6c 6c 6f 27>\r\n}\r\n```\r\nThis is because the Properties constructor in /lib/types/message.js maps `absoluteExpiryTime` to `absoluteExpiryT`:\r\n```javascript\r\n    absoluteExpiryTime: options.absoluteExpiryT,\r\n```\r\nIf I fix that by adding `ime` to the end, then I get the following exception:\r\n```\r\nf:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types.js:601\r\n                throw new errors.NotImplementedError('buffer-builder does not support 64-bit int appending');\r\n                ^\r\nAmqpNotImplementedError: buffer-builder does not support 64-bit int appending not yet implemented\r\n    at Object.typesArray.encodings.builder (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types.js:601:23)\r\n    at self.builders.(anonymous function) (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types.js:814:38)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:192:12)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:237:21)\r\n    at f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types.js:90:11\r\n    at Array.forEach (native)\r\n    at Types._listBuilder (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types.js:89:8)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:233:16)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:261:21)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:241:14)\r\n    at Message.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\types\\message.js:364:30)\r\n    at Codec.encode (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\codec.js:263:13)\r\n    at TransferFrame.AMQPFrame._writePayload (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\frames\\frame.js:183:11)\r\n    at TransferFrame.Frame.write (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\frames\\frame.js:74:8)\r\n    at Connection.sendFrame (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\connection.js:336:9)\r\n    at SenderLink._sendMessage (f:\\azure-iot-sdks\\node\\service\\node_modules\\amqp10\\lib\\sender_link.js:164:27)\r\n```\r\nI'd like to be able to set absoluteExpiryTime on AMQP messages.  Is it a simple thing to \"support 64-bit int appending\", or not so much?"},"comment":{"url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/comments/150088851","html_url":"https://github.com/noodlefrenzy/node-amqp10/issues/177#issuecomment-150088851","issue_url":"https://api.github.com/repos/noodlefrenzy/node-amqp10/issues/177","id":150088851,"user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars.githubusercontent.com/u/312966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T02:36:15Z","updated_at":"2015-10-22T02:36:15Z","body":"@damonbarry this is an easy fix, but I need until tomorrow morning to get the full fix in with tests. The short answer to your problem is: yes you need to fix that typo (whoops!), and secondly you are passing a number with too fine precision into that property so our codec is picking it up as an attempted 64bit (or rather as close as javascript can come to expressing such numbers). If you can't wait for my fix tomorrow, then a quick solution would be to chop some precision off the number. For example, you might instead use:\r\n\r\n```\r\nsender.send(\"hello\", {\r\n  properties: {\r\n    absoluteExpiryTime: Math.floor( Date.now() / 1000 ),\r\n    to: '/devices/dlbtest01/messages/devicebound'\r\n});\r\n```\r\n"}}