Selectors in node js

austinprabhu
austinprabhu Member Posts: 2

I see that selectors are not available in javascript API
https://docs.solace.com/API/API-Developer-Guide/Using-Selectors.htm

Will this feature ever come to javascript ?
What are some alternatives options for consuming messages based on specific message headers in javascript ?

Tagged:

Comments

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

    Hey @austinprabhu - there are no plans to supporting selectors on the javascript API. Could you please provide more details on the usecase as to why you would want to use selectors? Alternatively, you can use the topic to include extra details that you can filter on during message consumption which is much more efficient and performant than using selectors

  • austinprabhu
    austinprabhu Member Posts: 2

    @Tamimi, use case as follows

    Message posted in a queue is consumed by two clients. Both clients are interested in specific messages. Each client looks for identifier in message header to figure out which messages to consume. With selectors, idea was for two clients to consume message from a exclusive queue.


    I like the idea of having extra details. But does client need to read and parse message to decide whether it needs the message ? I was looking to avoid parsing the message when I don't need it.

    Thanks

    Austin