You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/02/07 15:02:26 UTC

[GitHub] [camel-kafka-connector] valdar opened a new pull request #85: First step for issue #15

valdar opened a new pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376472324
 
 

 ##########
 File path: connectors/camel-sjms2-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sjms2/CamelSjms2SourceConnectorConfig.java
 ##########
 @@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.kafkaconnector.sjms2;
+
+import java.util.Map;
+
+import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
+import org.apache.kafka.common.config.ConfigDef;
+
+public class CamelSjms2SourceConnectorConfig extends CamelSourceConnectorConfig {
+    //CHECKSTYLE:OFF
+    public static final Boolean CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF = "camel.component.sjms2.bridgeErrorHandler";
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF = "camel.component.sjms2.connectionFactory";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC = "A ConnectionFactory is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_CONF = "camel.component.sjms2.connectionResource";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DOC = "A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See Plugable Connection Resource Management for further details.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_CONF = "camel.component.sjms2.connectionCount";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DOC = "The maximum number of connections available to endpoints started under this component";
+
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_CONF = "camel.component.sjms2.jmsKeyFormatStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DOC = "Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides one implementation out of the box: default. The default strategy will safely marshal dots and hyphens (. and -). Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_CONF = "camel.component.sjms2.transactionCommitStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DOC = "To configure which kind of commit strategy to use. Camel provides two implementations out of the box, default and batch.";
+
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_CONF = "camel.component.sjms2.destinationCreationStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DOC = "To use a custom DestinationCreationStrategy.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_CONF = "camel.component.sjms2.timedTaskManager";
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DOC = "To use a custom TimedTaskManager";
+
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_CONF = "camel.component.sjms2.messageCreatedStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DOC = "To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_CONF = "camel.component.sjms2.connectionTestOnBorrow";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DOC = "When using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource then should each javax.jms.Connection be tested (calling start) before returned from the pool.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_CONF = "camel.component.sjms2.connectionUsername";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DOC = "The username to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_CONF = "camel.component.sjms2.connectionPassword";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DOC = "The password to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_CONF = "camel.component.sjms2.connectionClientId";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DOC = "The client ID to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_CONF = "camel.component.sjms2.connectionMaxWait";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DOC = "The max wait time in millis to block and wait on free connection when the pool is exhausted when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_CONF = "camel.component.sjms2.headerFilterStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DOC = "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_CONF = "camel.component.sjms2.basicPropertyBinding";
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DOC = "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_CONF = "camel.source.endpoint.durable";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DOC = "Sets topic consumer to durable.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_CONF = "camel.source.endpoint.shared";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DOC = "Sets the consumer to shared.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.subscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DOC = "Sets the subscription Id, required for durable or shared topics.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_CONF = "camel.source.endpoint.consumerCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DOC = "Sets the number of consumer listeners used for this endpoint.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.durableSubscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DOC = "Sets the durable subscription Id required for durable topics.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_CONF = "camel.source.endpoint.synchronous";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DOC = "Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_CONF = "camel.source.endpoint.exceptionHandler";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DOC = "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_CONF = "camel.source.endpoint.exchangePattern";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DOC = "Sets the exchange pattern when the consumer creates an exchange.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_CONF = "camel.source.endpoint.messageSelector";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DOC = "Sets the JMS Message selector syntax.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DEFAULT = "WARN";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_CONF = "camel.source.endpoint.errorHandlerLoggingLevel";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DOC = "Allows to configure the default errorHandler logging level for logging uncaught exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_CONF = "camel.source.endpoint.errorHandlerLogStackTrace";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DOC = "Allows to control whether stacktraces should be logged or not, by the default errorHandler.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_CONF = "camel.source.endpoint.transacted";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DOC = "Specifies whether to use transacted mode";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DEFAULT = -1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_CONF = "camel.source.endpoint.transactionBatchCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DOC = "If transacted sets the number of messages to process before committing a transaction.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_CONF = "camel.source.endpoint.transactionBatchTimeout";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DOC = "Sets timeout (in millis) for batch transactions, the value should be 1000 or higher.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DEFAULT = "AUTO_ACKNOWLEDGE";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_CONF = "camel.source.endpoint.acknowledgementMode";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DOC = "The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_CONF = "camel.source.endpoint.asyncStartListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DOC = "Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and\\/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_CONF = "camel.source.endpoint.asyncStopListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DOC = "Whether to stop the consumer message listener asynchronously, when stopping a route.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_CONF = "camel.source.endpoint.exceptionListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DOC = "Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_CONF = "camel.source.endpoint.includeAllJMSXProperties";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DOC = "Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_CONF = "camel.source.endpoint.mapJmsMessage";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DOC = "Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_CONF = "camel.source.endpoint.sharedJMSSession";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DOC = "Specifies whether to share JMS session with other SJMS endpoints. Turn this off if your route is accessing to multiple JMS providers. If you need transaction against multiple JMS providers, use jms component to leverage XA transaction.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DEFAULT = "queue";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_CONF = "camel.source.path.destinationType";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DOC = "The kind of destination to use: queue or topic.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_CONF = "camel.source.path.destinationName";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DOC = "DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name.";
+    
+    public CamelSjms2SourceConnectorConfig(ConfigDef config, Map<String, String> parsedConfig) {
+        super(config, parsedConfig);
+    }
+
+    public CamelSjms2SourceConnectorConfig(Map<String, String> parsedConfig) {
+        this(conf(), parsedConfig);
+    }
+
+    public static ConfigDef conf() {
+        ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
+
+        return conf.define(CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC)
+                .define(CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC)
 
 Review comment:
   No problems. We can iterate over it later since we will have this base. Thanks again for this !

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376462087
 
 

 ##########
 File path: tooling/camel-kafka-connector-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
 ##########
 @@ -0,0 +1,187 @@
+/*
 
 Review comment:
   See my last comment.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] orpiske edited a comment on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
orpiske edited a comment on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583489234
 
 
   > So @omarsmak @orpiske @oscerd I need your input and view on this (and form whoever likes to participate in the conversation).
   > 
   > As you can see there are 3 main parts to this PR:
   > 
   >     * changes to `core/`: these are to enable pre-configuration of a connector by subclassing `Camel{Sink,Source}Connector` and `Camel{Sink,Source}Task` and providing the initial configuration through an override of `getDefaultConfig()`. Everything is still configurable through the property file supplied when you run the connector since those properties have precedence. All will still work with the old `camel.{sink,source}.url` config since if this one is present all the properties `camel.endpoint` `camel.path` and `camel.{sink,source}.component` will be ignored. If `camel.{sink,source}.url` is null though, the url is assembled by combining `camel.{sink,source}.component` and `camel.endpoint` `camel.path` accordingly.
   > 
   >     * in `connectors/camel-sjms2-kafka-connector` there is the sjms2 connector done by hand has it should be generated.
   > 
   >     * in `tooling/` I have pre imported the maven plugins from camel-spring-boot project, but those are not functional, will serve as a base for the prosecution of my work: the actual generations.
   > 
   > 
   > That said here is my question: if you look at `CamelSjms2SinkConnectorConfig` and `CamelSjms2SourceConnectorConfig` in `connectors/camel-sjms2-kafka-connector` you see that there are all those kafka connector properties definitions that can be generated parsing the `camel-catalog`; has that much value-added? Those properties are never used in the code, they are there only for documentation resons, would be better to just generate good, tweaked for connectors, documentation starting from the catalog?
   
   This looks very good. My only comment here is regarding the properties. I think that even if they are not used in the code, there may be some value on them if they can be used for documentation purposes. Even if they are not directly used, folks reading the code may still find some value in them. 
   
   Everything else looks fine to me and I'm looking forward the changes.
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] oscerd commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376446203
 
 

 ##########
 File path: tooling/camel-kafka-connector-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
 ##########
 @@ -0,0 +1,187 @@
+/*
 
 Review comment:
   Is this Spring Boot stuff needed here?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376463189
 
 

 ##########
 File path: connectors/camel-sjms2-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sjms2/CamelSjms2SourceConnectorConfig.java
 ##########
 @@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.kafkaconnector.sjms2;
+
+import java.util.Map;
+
+import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
+import org.apache.kafka.common.config.ConfigDef;
+
+public class CamelSjms2SourceConnectorConfig extends CamelSourceConnectorConfig {
+    //CHECKSTYLE:OFF
+    public static final Boolean CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF = "camel.component.sjms2.bridgeErrorHandler";
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF = "camel.component.sjms2.connectionFactory";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC = "A ConnectionFactory is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_CONF = "camel.component.sjms2.connectionResource";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DOC = "A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See Plugable Connection Resource Management for further details.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_CONF = "camel.component.sjms2.connectionCount";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DOC = "The maximum number of connections available to endpoints started under this component";
+
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_CONF = "camel.component.sjms2.jmsKeyFormatStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DOC = "Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides one implementation out of the box: default. The default strategy will safely marshal dots and hyphens (. and -). Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_CONF = "camel.component.sjms2.transactionCommitStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DOC = "To configure which kind of commit strategy to use. Camel provides two implementations out of the box, default and batch.";
+
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_CONF = "camel.component.sjms2.destinationCreationStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DOC = "To use a custom DestinationCreationStrategy.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_CONF = "camel.component.sjms2.timedTaskManager";
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DOC = "To use a custom TimedTaskManager";
+
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_CONF = "camel.component.sjms2.messageCreatedStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DOC = "To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_CONF = "camel.component.sjms2.connectionTestOnBorrow";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DOC = "When using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource then should each javax.jms.Connection be tested (calling start) before returned from the pool.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_CONF = "camel.component.sjms2.connectionUsername";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DOC = "The username to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_CONF = "camel.component.sjms2.connectionPassword";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DOC = "The password to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_CONF = "camel.component.sjms2.connectionClientId";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DOC = "The client ID to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_CONF = "camel.component.sjms2.connectionMaxWait";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DOC = "The max wait time in millis to block and wait on free connection when the pool is exhausted when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_CONF = "camel.component.sjms2.headerFilterStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DOC = "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_CONF = "camel.component.sjms2.basicPropertyBinding";
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DOC = "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_CONF = "camel.source.endpoint.durable";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DOC = "Sets topic consumer to durable.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_CONF = "camel.source.endpoint.shared";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DOC = "Sets the consumer to shared.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.subscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DOC = "Sets the subscription Id, required for durable or shared topics.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_CONF = "camel.source.endpoint.consumerCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DOC = "Sets the number of consumer listeners used for this endpoint.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.durableSubscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DOC = "Sets the durable subscription Id required for durable topics.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_CONF = "camel.source.endpoint.synchronous";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DOC = "Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_CONF = "camel.source.endpoint.exceptionHandler";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DOC = "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_CONF = "camel.source.endpoint.exchangePattern";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DOC = "Sets the exchange pattern when the consumer creates an exchange.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_CONF = "camel.source.endpoint.messageSelector";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DOC = "Sets the JMS Message selector syntax.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DEFAULT = "WARN";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_CONF = "camel.source.endpoint.errorHandlerLoggingLevel";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DOC = "Allows to configure the default errorHandler logging level for logging uncaught exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_CONF = "camel.source.endpoint.errorHandlerLogStackTrace";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DOC = "Allows to control whether stacktraces should be logged or not, by the default errorHandler.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_CONF = "camel.source.endpoint.transacted";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DOC = "Specifies whether to use transacted mode";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DEFAULT = -1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_CONF = "camel.source.endpoint.transactionBatchCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DOC = "If transacted sets the number of messages to process before committing a transaction.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_CONF = "camel.source.endpoint.transactionBatchTimeout";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DOC = "Sets timeout (in millis) for batch transactions, the value should be 1000 or higher.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DEFAULT = "AUTO_ACKNOWLEDGE";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_CONF = "camel.source.endpoint.acknowledgementMode";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DOC = "The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_CONF = "camel.source.endpoint.asyncStartListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DOC = "Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and\\/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_CONF = "camel.source.endpoint.asyncStopListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DOC = "Whether to stop the consumer message listener asynchronously, when stopping a route.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_CONF = "camel.source.endpoint.exceptionListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DOC = "Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_CONF = "camel.source.endpoint.includeAllJMSXProperties";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DOC = "Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_CONF = "camel.source.endpoint.mapJmsMessage";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DOC = "Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_CONF = "camel.source.endpoint.sharedJMSSession";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DOC = "Specifies whether to share JMS session with other SJMS endpoints. Turn this off if your route is accessing to multiple JMS providers. If you need transaction against multiple JMS providers, use jms component to leverage XA transaction.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DEFAULT = "queue";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_CONF = "camel.source.path.destinationType";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DOC = "The kind of destination to use: queue or topic.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_CONF = "camel.source.path.destinationName";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DOC = "DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name.";
+    
+    public CamelSjms2SourceConnectorConfig(ConfigDef config, Map<String, String> parsedConfig) {
+        super(config, parsedConfig);
+    }
+
+    public CamelSjms2SourceConnectorConfig(Map<String, String> parsedConfig) {
+        this(conf(), parsedConfig);
+    }
+
+    public static ConfigDef conf() {
+        ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
+
+        return conf.define(CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC)
+                .define(CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC)
 
 Review comment:
   Good observation, it wasn't determined. A criterion is good as any other I guess.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar merged pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar merged pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376458978
 
 

 ##########
 File path: connectors/camel-sjms2-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/sjms2/CamelSjms2SourceConnectorConfig.java
 ##########
 @@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.kafkaconnector.sjms2;
+
+import java.util.Map;
+
+import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig;
+import org.apache.kafka.common.config.ConfigDef;
+
+public class CamelSjms2SourceConnectorConfig extends CamelSourceConnectorConfig {
+    //CHECKSTYLE:OFF
+    public static final Boolean CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF = "camel.component.sjms2.bridgeErrorHandler";
+    public static final String CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC = "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF = "camel.component.sjms2.connectionFactory";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC = "A ConnectionFactory is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_CONF = "camel.component.sjms2.connectionResource";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_RESOURCE_DOC = "A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See Plugable Connection Resource Management for further details.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_CONF = "camel.component.sjms2.connectionCount";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_COUNT_DOC = "The maximum number of connections available to endpoints started under this component";
+
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_CONF = "camel.component.sjms2.jmsKeyFormatStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_JMS_KEY_FORMAT_STRATEGY_DOC = "Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides one implementation out of the box: default. The default strategy will safely marshal dots and hyphens (. and -). Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_CONF = "camel.component.sjms2.transactionCommitStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_TRANSACTION_COMMIT_STRATEGY_DOC = "To configure which kind of commit strategy to use. Camel provides two implementations out of the box, default and batch.";
+
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_CONF = "camel.component.sjms2.destinationCreationStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_DESTINATION_CREATION_STRATEGY_DOC = "To use a custom DestinationCreationStrategy.";
+
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_CONF = "camel.component.sjms2.timedTaskManager";
+    public static final String CAMEL_SOURCE_SJMS2_TIMED_TASK_MANAGER_DOC = "To use a custom TimedTaskManager";
+
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_CONF = "camel.component.sjms2.messageCreatedStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_MESSAGE_CREATED_STRATEGY_DOC = "To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_CONF = "camel.component.sjms2.connectionTestOnBorrow";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_TEST_ON_BORROW_DOC = "When using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource then should each javax.jms.Connection be tested (calling start) before returned from the pool.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_CONF = "camel.component.sjms2.connectionUsername";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_USERNAME_DOC = "The username to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_CONF = "camel.component.sjms2.connectionPassword";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_PASSWORD_DOC = "The password to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_CONF = "camel.component.sjms2.connectionClientId";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_CLIENT_ID_DOC = "The client ID to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_CONF = "camel.component.sjms2.connectionMaxWait";
+    public static final String CAMEL_SOURCE_SJMS2_CONNECTION_MAX_WAIT_DOC = "The max wait time in millis to block and wait on free connection when the pool is exhausted when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource.";
+
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_CONF = "camel.component.sjms2.headerFilterStrategy";
+    public static final String CAMEL_SOURCE_SJMS2_HEADER_FILTER_STRATEGY_DOC = "To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_CONF = "camel.component.sjms2.basicPropertyBinding";
+    public static final String CAMEL_SOURCE_SJMS2_BASIC_PROPERTY_BINDING_DOC = "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_CONF = "camel.source.endpoint.durable";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_DOC = "Sets topic consumer to durable.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_CONF = "camel.source.endpoint.shared";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_DOC = "Sets the consumer to shared.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.subscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SUBSCRIPTION_ID_DOC = "Sets the subscription Id, required for durable or shared topics.";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DEFAULT = 1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_CONF = "camel.source.endpoint.consumerCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_CONSUMER_COUNT_DOC = "Sets the number of consumer listeners used for this endpoint.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_CONF = "camel.source.endpoint.durableSubscriptionId";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_DURABLE_SUBSCRIPTION_ID_DOC = "Sets the durable subscription Id required for durable topics.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_CONF = "camel.source.endpoint.synchronous";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SYNCRONOUS_DOC = "Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_CONF = "camel.source.endpoint.exceptionHandler";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_HANDLER_DOC = "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_CONF = "camel.source.endpoint.exchangePattern";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCHANGE_PATTERN_DOC = "Sets the exchange pattern when the consumer creates an exchange.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_CONF = "camel.source.endpoint.messageSelector";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MESSAGE_SELECTOR_DOC = "Sets the JMS Message selector syntax.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DEFAULT = "WARN";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_CONF = "camel.source.endpoint.errorHandlerLoggingLevel";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOGGIN_LEVEL_DOC = "Allows to configure the default errorHandler logging level for logging uncaught exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_CONF = "camel.source.endpoint.errorHandlerLogStackTrace";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ERROR_HANDLER_LOG_STACK_TRACE_DOC = "Allows to control whether stacktraces should be logged or not, by the default errorHandler.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_CONF = "camel.source.endpoint.transacted";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTED_DOC = "Specifies whether to use transacted mode";
+
+    public static final Integer CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DEFAULT = -1;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_CONF = "camel.source.endpoint.transactionBatchCount";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_COUNT_DOC = "If transacted sets the number of messages to process before committing a transaction.";
+
+    public static final Long CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DEFAULT = 5000L;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_CONF = "camel.source.endpoint.transactionBatchTimeout";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_TRANSACTION_BATCH_TIMEOUT_DOC = "Sets timeout (in millis) for batch transactions, the value should be 1000 or higher.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DEFAULT = "AUTO_ACKNOWLEDGE";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_CONF = "camel.source.endpoint.acknowledgementMode";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ACKNOWLEDGEMENT_MODE_DOC = "The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_CONF = "camel.source.endpoint.asyncStartListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_START_LISTENER_DOC = "Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and\\/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_CONF = "camel.source.endpoint.asyncStopListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_ASYNC_STOP_LISTENER_DOC = "Whether to stop the consumer message listener asynchronously, when stopping a route.";
+
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_CONF = "camel.source.endpoint.exceptionListener";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_EXCEPTION_LISTENER_DOC = "Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DEFAULT = false;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_CONF = "camel.source.endpoint.includeAllJMSXProperties";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_INCLUDE_ALL_JMSX_PROPERTIES_DOC = "Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_CONF = "camel.source.endpoint.mapJmsMessage";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_MAP_JMS_MESSAGE_DOC = "Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details.";
+
+    public static final Boolean CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DEFAULT = true;
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_CONF = "camel.source.endpoint.sharedJMSSession";
+    public static final String CAMEL_SOURCE_SJMS2_ENDPOINT_SHARED_JMS_SESSION_DOC = "Specifies whether to share JMS session with other SJMS endpoints. Turn this off if your route is accessing to multiple JMS providers. If you need transaction against multiple JMS providers, use jms component to leverage XA transaction.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DEFAULT = "queue";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_CONF = "camel.source.path.destinationType";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_TYPE_DOC = "The kind of destination to use: queue or topic.";
+
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DEFAULT = null;
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_CONF = "camel.source.path.destinationName";
+    public static final String CAMEL_SOURCE_SJMS2_PATH_DESTINATION_NAME_DOC = "DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name.";
+    
+    public CamelSjms2SourceConnectorConfig(ConfigDef config, Map<String, String> parsedConfig) {
+        super(config, parsedConfig);
+    }
+
+    public CamelSjms2SourceConnectorConfig(Map<String, String> parsedConfig) {
+        this(conf(), parsedConfig);
+    }
+
+    public static ConfigDef conf() {
+        ConfigDef conf = new ConfigDef(CamelSourceConnectorConfig.conf());
+
+        return conf.define(CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_CONF, ConfigDef.Type.BOOLEAN, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_BRIDGE_ERROR_HANDLER_CONSUMER_DOC)
+                .define(CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_CONF, ConfigDef.Type.STRING, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DEFAULT, ConfigDef.Importance.HIGH, CAMEL_SOURCE_SJMS2_CONNECTION_FACTORY_DOC)
 
 Review comment:
   How the importance being determined here? I guess it depends if the property is required?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583609491
 
 
   @valdar sure I can take a look at it on Monday and I will get back with the findings 

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-584066328
 
 
   @valdar sorry I was wrong. Apparently DBZ connector properties in the docs is a manual process 

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] orpiske commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
orpiske commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583489234
 
 
   > So @omarsmak @orpiske @oscerd I need your input and view on this (and form whoever likes to participate in the conversation).
   > 
   > As you can see there are 3 main parts to this PR:
   > 
   >     * changes to `core/`: these are to enable pre-configuration of a connector by subclassing `Camel{Sink,Source}Connector` and `Camel{Sink,Source}Task` and providing the initial configuration through an override of `getDefaultConfig()`. Everything is still configurable through the property file supplied when you run the connector since those properties have precedence. All will still work with the old `camel.{sink,source}.url` config since if this one is present all the properties `camel.endpoint` `camel.path` and `camel.{sink,source}.component` will be ignored. If `camel.{sink,source}.url` is null though, the url is assembled by combining `camel.{sink,source}.component` and `camel.endpoint` `camel.path` accordingly.
   > 
   >     * in `connectors/camel-sjms2-kafka-connector` there is the sjms2 connector done by hand has it should be generated.
   > 
   >     * in `tooling/` I have pre imported the maven plugins from camel-spring-boot project, but those are not functional, will serve as a base for the prosecution of my work: the actual generations.
   > 
   > 
   > That said here is my question: if you look at `CamelSjms2SinkConnectorConfig` and `CamelSjms2SourceConnectorConfig` in `connectors/camel-sjms2-kafka-connector` you see that there are all those kafka connector properties definitions that can be generated parsing the `camel-catalog`; has that much value-added? Those properties are never used in the code, they are there only for documentation resons, would be better to just generate good, tweaked for connectors, documentation starting from the catalog?
   
   This looks very good. My only comment here is regarding the properties. I think that even if they are not used in the code, there may be some value on them if they can be used for documentation properties. Even if they are not directly used, folks reading the code may still find some value in them. 
   
   Everything else looks fine to me and I'm looking forward the changes.
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376464937
 
 

 ##########
 File path: core/src/main/java/org/apache/camel/kafkaconnector/CamelSourceTask.java
 ##########
 @@ -42,6 +44,9 @@
 public class CamelSourceTask extends SourceTask {
 
 Review comment:
   Yeah we can iterate over it once the autogen is finished :). Well, it is true, but will be nice to keep it obvious that it may need some implementation ;)  

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376462707
 
 

 ##########
 File path: core/src/main/java/org/apache/camel/kafkaconnector/CamelSourceTask.java
 ##########
 @@ -42,6 +44,9 @@
 public class CamelSourceTask extends SourceTask {
 
 Review comment:
   Once we finished the whole autogeneration could be an option, the fact is, those are usable as they are, if you know what you are doing with the properties :)

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376462707
 
 

 ##########
 File path: core/src/main/java/org/apache/camel/kafkaconnector/CamelSourceTask.java
 ##########
 @@ -42,6 +44,9 @@
 public class CamelSourceTask extends SourceTask {
 
 Review comment:
   Once ve finished the whole autogeneration could be an option, the fact is, those are usable as they are, if you know what you are doing with the properties :)

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583462241
 
 
   So @omarsmak @orpiske @oscerd I need your input and view on this (and form whoever likes to participate in the conversation).
   
   As you can see there are 3 main parts to this PR:
   - changes to `core/`: these are to enable pre-configuration of a connector by subclassing `Camel{Sink,Source}Connector` and `Camel{Sink,Source}Task` and providing the initial configuration through an override of `getDefaultConfig()`. Everything is still configurable through the property file supplied when you run the connector since those properties have precedence. All will still work with the old `camel.{sink,source}.url` config since if this one is present all the properties `camel.endpoint` `camel.path` and `camel.{sink,source}.component` will be ignored. If `camel.{sink,source}.url` is null though, the url is assembled by combining `camel.{sink,source}.component` and `camel.endpoint` `camel.path` accordingly.
   - in `connectors/camel-sjms2-kafka-connector` there is the sjms2 connector done by hand has it should be generated.
   - in `tooling/` I have pre imported the maven plugins from camel-spring-boot project, but those are not functional, will serve as a base for the prosecution of my work: the actual generations.
   
   That said here is my question: if you look at `CamelSjms2SinkConnectorConfig` and `CamelSjms2SourceConnectorConfig` in `connectors/camel-sjms2-kafka-connector` you see that there are all those kafka connector properties definitions that can be generated parsing the `camel-catalog`; has that much value-added? Those properties are never used in the code, they are there only for documentation resons, would be better to just generate good, tweaked for connectors, documentation starting from the catalog?
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] oscerd commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583466976
 
 
   > So @omarsmak @orpiske @oscerd I need your input and view on this (and form whoever likes to participate in the conversation).
   > 
   > As you can see there are 3 main parts to this PR:
   > 
   > * changes to `core/`: these are to enable pre-configuration of a connector by subclassing `Camel{Sink,Source}Connector` and `Camel{Sink,Source}Task` and providing the initial configuration through an override of `getDefaultConfig()`. Everything is still configurable through the property file supplied when you run the connector since those properties have precedence. All will still work with the old `camel.{sink,source}.url` config since if this one is present all the properties `camel.endpoint` `camel.path` and `camel.{sink,source}.component` will be ignored. If `camel.{sink,source}.url` is null though, the url is assembled by combining `camel.{sink,source}.component` and `camel.endpoint` `camel.path` accordingly.
   > * in `connectors/camel-sjms2-kafka-connector` there is the sjms2 connector done by hand has it should be generated.
   > * in `tooling/` I have pre imported the maven plugins from camel-spring-boot project, but those are not functional, will serve as a base for the prosecution of my work: the actual generations.
   > 
   > That said here is my question: if you look at `CamelSjms2SinkConnectorConfig` and `CamelSjms2SourceConnectorConfig` in `connectors/camel-sjms2-kafka-connector` you see that there are all those kafka connector properties definitions that can be generated parsing the `camel-catalog`; has that much value-added? Those properties are never used in the code, they are there only for documentation resons, would be better to just generate good, tweaked for connectors, documentation starting from the catalog?
   
   If this options are usable in a configuration file and thinking about the fact we still have to generate documentation for the website, I think it makes sense to have these properties available and documented. We can also try to parse the kafka config classes and generate the single connector documentation from them. WDYT?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583469229
 
 
   @oscerd yeah we can use it `confDef` to generate the documentation, if not mistaken, Debezium uses the `confDef` to generate the documentation for the website

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on a change in pull request #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#discussion_r376455873
 
 

 ##########
 File path: core/src/main/java/org/apache/camel/kafkaconnector/CamelSourceTask.java
 ##########
 @@ -42,6 +44,9 @@
 public class CamelSourceTask extends SourceTask {
 
 Review comment:
   Do you think it makes sense if we change the base classes `CamelSinkConnector`, `CamelSourceConnector`, `CamelSinkTask` and `CamelSourceTask` to abstract with abstract methods that need to be overriden? IMHO it makes it easier to follow that need to be overriden 

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] oscerd commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583469731
 
 
   We can merge this once you fix the findings from @omarsmak and start from this base. @zregvart can you help on setting up the needed bits for publishing on the website? A simple page for the moment would be good, since we need to setting up the same for Spring boot support (camel-spring-boot repository) it would be good if you could help here or after the spring boot stuff. If you have time obviously.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] omarsmak commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
omarsmak commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583468370
 
 
   @valdar I think these configs could be used if you plan to start the these connectors programetely, as it makes it easier to just do something like `Properties.put(CamelSjms2SinkConnectorConfig.CAMEL_SINK_SJMS2_CONNECTION_RESOURCE_CONF, "test")`. If it is not too much of hassle, I'd prefer to keep them though  

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [camel-kafka-connector] valdar commented on issue #85: First step for issue #15

Posted by GitBox <gi...@apache.org>.
valdar commented on issue #85: First step for issue #15
URL: https://github.com/apache/camel-kafka-connector/pull/85#issuecomment-583585660
 
 
   So to summarize  3 votes towards trying to generate the Kafka Connect `propertyDef` and on top of that generating the documentation (directly from them or from the catalog is to be understood).
   
   I fear we might integrate the generation of the documentation from `propertyDef`, if you have noticed, complex Object properties are defined as STRING in the `propertyDef` since there is no other way that I have found.
   
   @omarsmak since you mentioned it, can you have a look at what Debezium dose to generate the properties from `propertyDef`? Maybe we can open a separate issue for that?

----------------------------------------------------------------
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


With regards,
Apache Git Services