Can Message Selectors be Used with AMQP

Does AMQP support Message Selectors similar to JMS?

Yes, as of release 9.1 (which was released in May of this year) PubSub+ Event Brokers allow you to use JMS selectors when using AMQP 1.0 JMS APIs.

@marc.dipasquale 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?

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: Using 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.