Messages in Solace are routed based on the topic or queues. With Solace's REST messaging feature, the topic or queue that the producer is publishing to is determined by the HTTP request-target.
e.g.
To send to topic "A", use http://[solaceIP:restPort]/TOPIC/A
To send to queue "B", use http://[solaceIP:restPort]/QUEUE/Q/B
Solace REST messaging makes use of standard HTTP headers and introduces some custom headers specifically related to the Solace REST implementation. These headers do not determine where the message is routed but can determine other behavior related to the messaging. e.g. Setting the "Solace-DMQ-Eligible" header to true will allow for the message to be eligible to expire to the Dead Message Queue.
All headers are explained here: https://docs.solace.com/RESTMessagingPrtl/Solace-REST-Message-Encoding.htm#_Ref393979969
On the receiving end, a REST Delivery Point can be bound to one or more queues. Any messages delivered to these queues will be sent to the configured REST consumer.