activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kovacro <robert.ko...@loto-quebec.com>
Subject Re: ActiveMQ REST Api with HTTP
Date Wed, 10 May 2017 12:18:50 GMT
Hello,

Point 1:

I insert the the 4 following messages

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 "selector test" -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"

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

I retrieve 2 of them with this command

curl -u admin:admin -X GET
"http://localhost:8161/api/message?destination=queue://Test_Kovac?type=queue&clientId=jojo"

When I try with a different clientID, it doesn't work:

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

Since the clientID is not a filter, why doesn't it work?


---------------
Point 2:

With the 2 followoing messages:
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=2" -H "selector: test" -H
"Content-Type: text/plain" -XPOST
"http://localhost:8161/api/message?destination=queue://Test_Kovac&&clientId=KovacIP2&test=2"

I try this selector and it doesn't work, I can retrieve everything:
curl -u admin:admin -H "selector: test=2" -X GET
"http://localhost:8161/api/message?destination=queue://Test_Kovac?type=queue&clientId=KovacIP2"

Conclusion: I can seem to filter any messages.






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

Mime
View raw message