Convert IsSingleton and MultipleConsumersSupport to marker interfaces?
(resending...used wrong email account...)
Hi, what would appear to be marker interfaces
org.apache.camel.MultipleConsumersSupport have seemingly redundant
isSingleton() and isMultipleConsumersSupported() methods -- wouldn't it
be better to remove those methods and make them pure marker/tagging
interfaces (removing them from those objects for which the above methods
would return false), and rely on instanceof() instead of calling those
boolean methods (a la org.apache.camel.ServicePoolAware?) I don't
know the reason for those boolean methods--a coding error or performance
decision (assuming there would be one) to have them. I can supply a
patch if desired.
Re: Convert IsSingleton and MultipleConsumersSupport to marker interfaces?
When you have a boolean method it gives more power, for example we use
this with the IsSingleton, to provide a sensitive default in the
And then custom endpoints can override and return another value instead.
Also the JMS endpoint has a case where depending whether its a topic
or queue, its either singleton or not.
I think its sort of the same case of the MultipleConsumerSupport as
you can configure this per endpoint, eg ?multipleConsumers=true|false.