Can Message Selectors be Used with AMQP

arm
arm Member Posts: 15

Does AMQP support Message Selectors similar to JMS?

Tagged:

Best Answer

Answers

  • dreamoka
    dreamoka Member Posts: 56 ✭✭✭

    @marc does message selector work for queue endpoint which the access type is exclusive?

    1st message in queue : type = abc

    2nd message in queue : type = def

    3rd message in queue : type = abc

    if my message selector is "type = def", will it purge the first and third message in the queue?

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

    Hi @dreamoka,

    Short answer: Yes they work with queues, no they don't purge the messages...so they will sit there until they expire.

    More info in docs here: https://docs.solace.com/API/API-Developer-Guide/Using-Selectors.htm?#Setting-Selectors.

    **Note that I suggest NOT doing this if you can avoid it. Use a well-defined topic hierarchy that has the data in the topic that you want to filter on and then set up a queue which subscribes to only the messages that your app wants.