🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

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