Are key words "TOPIC" and "QUEUE" case-sensitive in CURL?

felix0315
felix0315 Member Posts: 2

Hello Exports,

Greetings.

Are key words "TOPIC" and "QUEUE" case-sensitive in CURL?

Thank you.

https://docs.solace.com/API/RESTMessagingPrtl/Solace-REST-Example.htm

Felix,

BR

Best Answer

  • felix0315
    felix0315 Member Posts: 2
    #2 Answer ✓

    Hello All,

    many thanks for your kind answers.

    I did a rough test on our Solace test system and found it's not case sensitive.

    Posting payload to the following URLs has the same result. Subscribers can all receive payload.

    https://host:port/TOPIC/flight/boarding/fl1234/yow/ewr
    https://host:port/topic/flight/boarding/fl1234/yow/ewr
    https://host:port/toPic/flight/boarding/fl1234/yow/ewr
    https://host:port/ToPic/flight/boarding/fl1234/yow/ewr
    https://host:port/ToPiC/flight/boarding/fl1234/yow/ewr
    https://host:port/flight/boarding/fl1234/yow/ewr

    Thank you.

    Felix,

    BR

Answers

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 972 admin

    Hey @felix0315,

    Great question! I'm actually not sure and don't see it specified in the docs. But note that both queues and topics are case sensitive so you don't want to be converting everything to one case in the URL ;)

    Also all the examples I see have that level in all caps I would recommend using all caps unless we learn otherwise. Did you happen to try lowercase just to see if it works?

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 664 admin
    edited January 7 #4

    No it's not case sensitive.

    Also, if the very first level isn't (case insensitive) "topic" or "queue", the whole this is treated as a topic. That is:

    curl -u foo:bar http://localhost:9000/q1 -d 'this is my payload'
    

    Will be a message published with a topic of q1. EDIT: oh, that was already mentioned in the first post! haha

    But yeah, always a topic, unless the first level is the word "queue".

  • felix0315
    felix0315 Member Posts: 2
    #5 Answer ✓

    Hello All,

    many thanks for your kind answers.

    I did a rough test on our Solace test system and found it's not case sensitive.

    Posting payload to the following URLs has the same result. Subscribers can all receive payload.

    https://host:port/TOPIC/flight/boarding/fl1234/yow/ewr
    https://host:port/topic/flight/boarding/fl1234/yow/ewr
    https://host:port/toPic/flight/boarding/fl1234/yow/ewr
    https://host:port/ToPic/flight/boarding/fl1234/yow/ewr
    https://host:port/ToPiC/flight/boarding/fl1234/yow/ewr
    https://host:port/flight/boarding/fl1234/yow/ewr

    Thank you.

    Felix,

    BR

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 972 admin

    Thanks for confirming @felix0315!

    If you fly to YOW this time of year don't forget your jacket ;)

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 664 admin

    @marc that topic looks like they're flying from YOW..! 😅

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 543 admin

    @Aaron in which case then I hope they're flying to somewhere warm; forget your jacket!