camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendy Irawan <he...@soluvas.com>
Subject Re: Implementing Publish Subscribe Channel
Date Sun, 06 Dec 2009 15:51:36 GMT



Claus Ibsen-2 wrote:
> 
> Maybe spring event can be used also?
> http://camel.apache.org/event.html
> 

I guess that'd mean my message has to be an ApplicationEvent.


Claus Ibsen-2 wrote:
> 
> You can create you own component that offers topic like functionally.
> You could extend the seda or direct component and implement the logic
> missing.
> 

Thanks for the encouragement. :-)


Claus Ibsen-2 wrote:
> 
> I would assume adding @Consume to any POJO does not require any routes
> to pre existing and cannot see why its not dynamic.
> 

Yes indeed, unfortunately @Consume breaks when there are two @Consume'rs on
the same endpoint that is not a publish-subscribe channel. It seems like
it's doing round-robin (?) instead of multicast.

For example, I'd like:

/* bean1 */
@Consume("seda:mychannel") public void Yeeha(String msg) { }
/* bean2 */
@Consume("seda:mychannel") public void Yaahi(String msg) { }

to behave as if an explicit route is specified (with multicast):

<from uri="seda:channel">
<multicast>
  <to uri="bean:bean1" />
  <to uri="bean:bean2" />
</multicast>
</from>

but right now, it seems messages are being routed round-robin when using the
@Consumer. That's why I said doing multicast dynamically (with @Consume)
seem to be not possible.

Thank you.
-- 
View this message in context: http://old.nabble.com/Implementing-Publish-Subscribe-Channel-tp26654086p26666101.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message