Hello,

I am using:
curl-7.48.0-win32-mingw
apache-activemq-5.14.5-bin (locally)

I can add messages like this:
curl -u admin:admin -d "hello world 1" -H "Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP1";

curl -u admin:admin -d "hello world 1" -H "Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP2";

I can retrieve both messages with:
curl -u admin:admin -X GET
"http://localhost:8161/api/message?destination=queue://Test_Kovac?type=queue&clientId=KovacIP1";

1- How come my clientid parameter doesn't filter wich messages I retrieve?
"When using this approach, you don't need to keep sessions alive between
requests, you just need to use the same clientId every time."

---------------------------------------------

Afterwards, I try using selectors, but they don't seem to work either

I insert this:
curl -u admin:admin -d "hello world 1" -H "Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP1";

curl -u admin:admin -d "test selector" -H "Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP2&test=2";

curl -u admin:admin -d "hello world 3" -H "Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP3";

When I try to retrieve test=2 with this command

curl -u admin:admin -H "selector: test=2" -X GET
"http://localhost:8161/api/message?destination=queue://Test_Kovac?type=queue&clientId=KovacIP2";

I have access to all the message. I retreive them all (all 3 of them) 1 by
1.

Why is that?

How does the selector work?

Thanks for your help







--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-REST-Api-with-HTTP-tp4725797.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to