activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: ActiveMQ REST Api with HTTP
Date Fri, 12 May 2017 05:05:04 GMT
Is what you're doing (setting them via request parameters on the URL) the
right way to set message header properties (e.g. test=2)? The page doesn't
say explicitly, but I had assumed that you'd need to use the --header
approach.

You should be able to publish your messages and then look at them in the
web console to confirm that the right values are getting set. Once you get
the publisher working right, then you can move on to the consumer,
selectors, etc.

Tim

On May 10, 2017 6:31 AM, "kovacro" <robert.kovac@loto-quebec.com> wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message