[rabbitmq-discuss] Rest services to get messages from Queue

Srinath Sridharan -X (srinatsr - ZENSAR TECHNOLOGIES INC at Cisco) srinatsr at cisco.com
Thu May 1 18:25:42 BST 2014


Hello,

I couldn't hit this service from Java Class.  But I could hit through rest client Url : http://qot-job-03:15672/api/queues/%2F/validate.monitor/get

I know the issue with url encoding and decoding.


             String url ="http://qot-job-03:15672/api/queues/%2F/validate.monitor/get";

try {
                    result = restTemplate.exchange(url, HttpMethod.POST, entity, QueueMonitorRespone.class);
                    System.out.println("Sample Response :: "+result.getBody());

             }
                    catch (HttpClientErrorException e) {
                           e.printStackTrace();
                    }
Please need your help to resolve this.

As per above code, the url is taking something like  http://qot-job-03:15672/api/queues/%252F/validate.monitor/get because "%" is decoded as "%25" and don't want this to happen.

Request Json :

{"vhost":"/","name":"validate.monitor","truncate":"50000","requeue":"true","encoding":"auto","count":"1000"}
Regards ...*
Srinath

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140501/f5640030/attachment.html>


More information about the rabbitmq-discuss mailing list