On Tue, Jan 12, 2010 at 4:34 PM, Drone42 <[email protected]> wrote: > > I want to publish messages on a set of JMS queries, using the > publish-subscribe pattern to route messages to interested consumers. My > messages are simple POJOs (basically parameters), subtyped based on an ID. I > have thousands of subtypes. Each consumer will typically be interested in > maybe 100 of these. > > Question 1; What is most performant > > 1. Having a topic per subtype and the consumers listening to a subset. I > will in this case have thousands of topics. > 2. Having one topic into which all messages go and use a JMS message > property and a selector per consumer? > > Looking at the net for performance evaluations it seems a general problem > for JMS implemenations to handle many topics. > > Assuming that answer 2 is the way to go... > > Question 2: Can I automatically set the ID as a property in the JMS message > as part of the Camel route? The ID is available as an attribute with > getters/setters in my POJO. Is there a component that already does this, or > will I have to create my own messageConverter?
You can use the setHeader DSL to set an header. To get the data from your pojo you can invoke a bean which returns it, or use scripting language. I do want in the future to improve simple language in Camel to have a light weight getter support for POJOs. It does not support that currently. > -- > View this message in context: > http://old.nabble.com/Setting-HMS-property-tp27129400p27129400.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
