reading one item from the queue the queue name is the right side of the url to the last slash. For url / sss / q2, the queue name is “q2”. This is done intentionally, since all URLs are hung on a specific location and proxied through nginx. curl 10.0.0.1:8080/sss/q2 {"result": "OK", "message":"message 2", size : 2} // size - , .
reading all items from the queue curl 10.0.0.1:8080/sss/q2?all {"result": "OK", "count" : 2, messages ["message 3","the text\"xxxx\" tttt"]} // count - .
publication The name of the exchange is also the part of the url between the last slash and '?', And the key of the exchange is the part of the url, after the question mark. For example for urla 10.0.0.1 : 8080 / sss / ex1? News the name of the exchange is “ex1”, and the key of the exchange (routing key) is “news” curl -d 'some post data' 10.0.0.1:8080/sss/ex1?news {"result": "Ok"}
Of course, everything is designed for AJAX. nginx stands front server and proxies requests for amqp-rest. You can do without nginx, if you hang them on different IP. In my case, I use ngx_accesskey_module to protect against spam. Perhaps this functionality will be transferred to amqp-rest in the future.
conclusion
what seems to be performance: 1300rps memory space 601k