I am able to send message to a specific subscription of azure service bus topic using apache camel using exmaple here
if you see "subject" is "test" and there is a custom property "test" that has value "test".
I want to see the same thing when i use apache camel to send it. Please help. Thanks
CodePudding user response:
Today it's not possible with the latest version of Camel, however it will be shipped in the next release.
Relevant ticket : https://issues.apache.org/jira/browse/CAMEL-18459
And this is how it will look like :
from("timer:foo1?period=15000&delay=1000")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setBody("{\"message\":\"hello\"}");
exchange.getIn().setHeader(ServiceBusConstants.APPLICATION_PROPERTIES, Map.of("prop1", "value1"));
}
})
.to("azure-servicebus:demo?serviceBusType=topic&connectionString=RAW(connection-string-here");