java - Camel: Implementing Polling and Non-Polling Consumer within the same component -


i implementing own custom component , have found going need 2 use cases consumers:

  • the first 1 trying n number of available messages every (polling consumer)
  • the second 1 subscriber consumer gets messages when available.

my main question if possible implement these 2 types. have been trying write code, seems if developing pollingconsumer cannot implement type. also, if possible, there example, article or guide how this? have been looking for nothing came up.

thanks!

there 2 consumer kind in camel (eg eip book)

  • consumer
  • pollingconsumer

its former used in camel routes. , latter used when use explicit or when using consumertemplate, use receive methods.

a camel component able adapt consumer pollingconsumer out of box.

so depends if want build camel component used in routes, can create consumer. , have able both poll , subscribe. when have data, create exchange , call processor route it.

for documentation check camel website, and/or chapter 11 in camel in action book covers creating custom components.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -