Selectors in node js

Options
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: 499 admin
    Options

    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
    Options

    @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

  • carlosphilip
    carlosphilip Member Posts: 1
    Options

    Selectors in Node.js refer to mechanisms used to target specific elements or data within the Node.js environment. xfinity billing issue These selectors allow developers to access elements in the Document Object Model (DOM), parse data from files or databases, or query APIs for specific information. Commonly used selectors in Node.js include libraries like Cheerio for HTML parsing, XPath for XML traversal, or native methods like querySelectorAll for DOM manipulation. By leveraging selectors effectively, developers can efficiently extract and manipulate data within their Node.js applications, enabling powerful data processing capabilities.