camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gérald Quintana (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6588) Choose BlockingQueue implementation in Seda component
Date Fri, 02 Aug 2013 21:25:48 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728139#comment-13728139
] 

Gérald Quintana commented on CAMEL-6588:
----------------------------------------

Willem,
Here is a paragraph to add to the wiki:

h3. Choosing BlockingQueue implementation
*Available as of Camel 2.12*

By default, the SEDA component always intantiates LinkedBlockingQueue, but you can use different
implementation, you can reference your own BlockingQueue implementation, in this case the
size option is not used
{code}
<bean id="arrayQueue" class="java.util.ArrayBlockingQueue">
  <constructor-arg index="0" value="10" ><!-- size -->
  <constructor-arg index="1" value="true" ><!-- fairness -->
</bean>
<!-- ... and later -->
<from>seda:array?queue=#arrayQueue</from>
{code} 

Or you can reference a BlockingQueueFactory implementation, 3 implementations are provided
LinkedBlockingQueueFactory, ArrayBlockingQueueFactory and PriorityBlockingQueueFactory:
{code}
<bean id="priorityQueueFactory" class="org.apache.camel.component.seda.PriorityBlockingQueueFactory">
  <property name="comparator">
    <bean class="org.apache.camel.demo.MyExchangeComparator" />
  </property>
</bean>
<!-- ... and later -->
<from>seda:priority?queueFactory=#priorityQueueFactory&size=100</from>
{code} 

                
> Choose BlockingQueue implementation in Seda component
> -----------------------------------------------------
>
>                 Key: CAMEL-6588
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6588
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.11.0
>            Reporter: Gérald Quintana
>            Assignee: Willem Jiang
>            Priority: Minor
>
> In Seda component, BlockingQueue is by default a LinkedBlockingQueue. Make this configurable,
in order to plug in a PriorityBlockingQueue or any other BlockingQueue type.
> See http://camel.465427.n5.nabble.com/SEDA-with-PriorityBlockingQueue-td5736411.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message