You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christopher Piggott <cp...@gmail.com> on 2015/04/08 21:59:29 UTC

Event driven producer?

Does the idea of an 'event driven producer' make sense?  One that receives
messages/exchange but doesn't necessarily produce one for every input?

My input comes in as bytes that need to be assembled.  A DefaultProducer
seems t have a process() which produces messages 1;1 which is not what I
need.  I need to programmatically determine whether or not to emit an
exchange, or do nothing (i.e. buffer it for a while until I have something
to output).

Re: Event driven producer?

Posted by "mailinglist@j-b-s.de" <ma...@j-b-s.de>.
Hi Christopher!

Why not using an aggregator?

Or you simply emit your messages 1:1 and set the message body to 'null' if there is nothing to send from your business logic perspective. You can simply use a filter afterward to drop all messages having a 'null' body to get your expected behaviour.

Jens

Von meinem iPhone gesendet

> Am 08.04.2015 um 21:59 schrieb Christopher Piggott <cp...@gmail.com>:
> 
> Does the idea of an 'event driven producer' make sense?  One that receives
> messages/exchange but doesn't necessarily produce one for every input?
> 
> My input comes in as bytes that need to be assembled.  A DefaultProducer
> seems t have a process() which produces messages 1;1 which is not what I
> need.  I need to programmatically determine whether or not to emit an
> exchange, or do nothing (i.e. buffer it for a while until I have something
> to output).