You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/01/27 13:51:00 UTC

[jira] [Work logged] (CAMEL-13807) Component DSL - To configure components like endpoint DSL

     [ https://issues.apache.org/jira/browse/CAMEL-13807?focusedWorklogId=377636&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-377636 ]

ASF GitHub Bot logged work on CAMEL-13807:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jan/20 13:50
            Start Date: 27/Jan/20 13:50
    Worklog Time Spent: 10m 
      Work Description: omarsmak commented on pull request #3521: [WIP] CAMEL-13807: Add Component DSL fluent builders
URL: https://github.com/apache/camel/pull/3521
 
 
   This is work in progress on CAMEL-13807 in order to component DSL fluent builders. Few notes:
   
   1. To use it to create a component, it can be used like this `ComponentsBuilderFactory.kafka().setBrokers("{{host:port}}").build()`
   2. Since I needed to maintain the POM file and `ComponentsBuilderFactory` interface, I used a metadata json file to keep track on the generated DSL classes and update whatever needed. 
   3. To set the properties, I used component property configurer since it generates what is needed and I made use of that. 
   4. Since I used the metadata file approach, the build speed wasn't impacted much which is good.
   5. If the placeholder needs to be resolved, the component needs to be built with the context being passed as parameter: 
   `ComponentsBuilderFactory.kafka().setBrokers("{{host:port}}").build(camelContext)`
   6. There are a lot of shared functionality between endpoinsDslMojo and componentsDslMojo, hence 
   I have created an abstract class for both and helpers that can be shared in both. However, I left EndpointDslMojo untouched for now. Will remove some shared core once I am done from this PR. 
   
   Topics need to be done:
   
   - [ ] Fix checkstyle.
   - [ ] Add unit tests for the maven plugin generators.
   - [ ] Add more unit tests for `camel-componentDsl`.
   - [ ] Optimize some classes on the go.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 377636)
    Remaining Estimate: 0h
            Time Spent: 10m

> Component DSL - To configure components like endpoint DSL
> ---------------------------------------------------------
>
>                 Key: CAMEL-13807
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13807
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Claus Ibsen
>            Assignee: Omar Al-Safi
>            Priority: Major
>             Fix For: 3.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Some components can also be configured, and today you can configure them via
> - spring boot auto configuration
> - camel main configuration
> - java code manually via setter/getter
> - xml syntax via <bean>
> We should look at generating a Java component DSL with fluent builder like camel-endpointdsl. Then its similar and you can configure them
>   component().jms().concurrentConsumers(5).keepAlive(6000)
> And then later if/when we do a XML version of endpoint DSL we can do one for components too.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)