There currently is no support for specifying arbitrary message properties on a message published by a REST client.
It helped knowing that what I was looking for does not exist. Thanks!
The workaround is to create an incoming topic and a JMS bridge between the REST publisher and REST subscribers.
So a setup might look like this:
REST publisher ==> incomingTopic == push ==> JMS bridge (see note 1) == publish ==> notifyTopic == push ==> REST subscriber
note 1: In this code,
- a JMS client receives the message (HornetQ receives it as a ByteMessage... you'll have to convert it to a String to get to the original XML)
- Create an ObjectMessage for the outgoing message. The message body is the original XML string.
- Add properties, as appropriate (e.g., call Message's setStringProperty).
- Per section 9.1 of the "HornetQ REST Interface 2.2.5.Final", set the property as follows: message.setStringProperty(org.hornetq.rest.HttpHeaderProperty.CONTENT_TYPE, "application/xml");
- Publish the outgoing message
- The REST subscribers should receive the messages per the filter settings when they subscribed