i working sqs queue send element using python boto. when try receive java, else, not same body.
this java:
createqueuerequest createqueuerequest = new createqueuerequest().withqueuename("random_queue"); string queueurl = sqsclient.createqueue(createqueuerequest).getqueueurl(); receivemessagerequest receivemessagerequest = new receivemessagerequest(queueurl).withwaittimeseconds(20); list<message> messages = sqsclient.receivemessage(receivemessagerequest).getmessages(); system.out.println(messages.tostring()); (message message : messages) { string element = message.getbody(); system.out.println(" [x] received '" + element + "'"); }
output: [x] received 'zgy1yzniodytntm4ny00nzvmlthkmgetmdc4mzkxm2m2ywy5'
python code:
my_queue = conn.create_queue('random_queue', 900) m = my_queue.read() body= m.get_body() print body
output : df5c3b86-5387-475f-8d0a-0783913c6af9
(this actual message sent in queue)
why java returning different message python?
java code returning in base 64 . decode original message.
Comments
Post a Comment