Hi,

I'm currently doing some tests with the java broker's REST API (6.0.1), mainly 
queue management, i.e. GET, PUT, DELETE and ran into something strange.
Assuming the broker is running on localhost and on port 8080, I can perform 
following requests:
GET: http://localhost:8080/api/latest/queue will return all defined queues, 
even those not defined on the default vhost / vhostnode
DELETE: http://localhost:8080/api/latest/queue?name=newQueue will delete queue 
with name "newQueue"

But
PUT: http://localhost:8080/api/latest/queue with body content {"name": 
"newQueue"} will result in an error (HTTP status 500 and a 
java.lang.IndexOutOfBoundsException in the broker's logs).
PUT: http://localhost:8080/api/latest/queue/newQueue with body content {} will 
result in an error, too (HTTP status 422 and errorMessage "Either parent path 
or full object path must be specified on object creation. Full object path must 
be specified on object update. Found [] of size 0 expecting 3")

PUT: http://localhost:8080/api/latest/queue/default/default/newQueue  with body 
content {}
and
PUT: http://localhost:8080/api/latest/queue/default/default with body content 
{"name": "newQueue"}
will succeed.

Is that somehow intended or is it a bug? I would have expected the queue to be 
created for the virtual host (node) configured as default either ways.

2 other behaviours I noticed that I find strange:
A DELETE request, if not resulting in an error, will always return HTTP status 
200 and no body content, no matter if a queue with that name exists or not
A DELETE request, if not resulting in an error, will always return HTTP status 
200 and no body content, no matter if a queue with that name exists or not

I would expect to somehow be notified of the fact that a queue I try to delete 
does not exist or that a queue I try to create already exists.


Best regards,
Julien

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: [email protected]<mailto:[email protected]>
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Jon Joseba Goyarzu Caño
http://avitech.aero<http://avitech.aero/>

This message may contain confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.

Reply via email to