diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/pom.xml
new file mode 100644
index 0000000..232a493
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-publish-bytes-connector
+ Syndesis Connectors :: ActiveMQ Publish Bytes Connector
+ JMS Publish Bytes Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishBytesComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishBytesComponent.java
new file mode 100644
index 0000000..d9ac0cc
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishBytesComponent.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-publish-bytes connector
+ */
+public class ActiveMQPublishBytesComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQPublishBytesComponent() {
+ super("activemq-publish-bytes", ActiveMQPublishBytesComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message out = exchange.getIn();
+ JmsBytesMessage jmsBytesMessage = out.getBody(JmsBytesMessage.class);
+ out.setBody(jmsBytesMessage.getBody());
+ if (jmsBytesMessage.getHeaders() != null) {
+ out.setHeaders(jmsBytesMessage.getHeaders());
+ }
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorAutoConfiguration.java
new file mode 100644
index 0000000..df15948
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQPublishBytesComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQPublishBytesConnectorConfiguration.class)
+public class ActiveMQPublishBytesConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQPublishBytesConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQPublishBytesConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-publish-bytes-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQPublishBytesComponent configureActiveMQPublishBytesComponent()
+ throws Exception {
+ ActiveMQPublishBytesComponent connector = new ActiveMQPublishBytesComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-bytes.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-bytes.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQPublishBytesComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQPublishBytesComponent connector = new ActiveMQPublishBytesComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-bytes."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-bytes."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfiguration.java
new file mode 100644
index 0000000..e870049
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-publish-bytes")
+public class ActiveMQPublishBytesConnectorConfiguration
+ extends
+ ActiveMQPublishBytesConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfigurationCommon.java
new file mode 100644
index 0000000..858ca9e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishBytesConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Publish JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQPublishBytesConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-bytes-connector b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-bytes-connector
new file mode 100644
index 0000000..4fdeb10
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-bytes-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQPublishBytesComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..675638d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQPublishBytesConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..f881346
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-publish-bytes",
+ "syntax":"activemq-publish-bytes:destinationType:destinationName",
+ "title":"ActiveMQPublishBytes",
+ "description":"Publish JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-publish-bytes-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..05be186
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-bytes-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQPublishBytes",
+ "scheme" : "activemq-publish-bytes",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQPublishBytesComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-publish-bytes-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Publish JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "outputDataType" : "none",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/pom.xml
new file mode 100644
index 0000000..d39b220
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-publish-map-connector
+ Syndesis Connectors :: ActiveMQ Publish Map Connector
+ JMS Publish Map Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishMapComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishMapComponent.java
new file mode 100644
index 0000000..3d32024
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishMapComponent.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-publish-map connector
+ */
+public class ActiveMQPublishMapComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQPublishMapComponent() {
+ super("activemq-publish-map", ActiveMQPublishMapComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message out = exchange.getIn();
+ JmsMapMessage jmsMapMessage = out.getBody(JmsMapMessage.class);
+ out.setBody(jmsMapMessage.getBody());
+ if (jmsMapMessage.getHeaders() != null) {
+ out.setHeaders(jmsMapMessage.getHeaders());
+ }
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorAutoConfiguration.java
new file mode 100644
index 0000000..61f1773
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQPublishMapComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQPublishMapConnectorConfiguration.class)
+public class ActiveMQPublishMapConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQPublishMapConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQPublishMapConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-publish-map-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQPublishMapComponent configureActiveMQPublishMapComponent()
+ throws Exception {
+ ActiveMQPublishMapComponent connector = new ActiveMQPublishMapComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-map.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-map.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQPublishMapComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQPublishMapComponent connector = new ActiveMQPublishMapComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-map."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-map."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfiguration.java
new file mode 100644
index 0000000..60d060d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-publish-map")
+public class ActiveMQPublishMapConnectorConfiguration
+ extends
+ ActiveMQPublishMapConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfigurationCommon.java
new file mode 100644
index 0000000..1a65c7d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishMapConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Publish JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQPublishMapConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-map-connector b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-map-connector
new file mode 100644
index 0000000..6a771a4
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-map-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQPublishMapComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..d987117
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQPublishMapConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..cc8790e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-publish-map",
+ "syntax":"activemq-publish-map:destinationType:destinationName",
+ "title":"ActiveMQPublishMap",
+ "description":"Publish JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-publish-map-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..0bac58d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-map-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQPublishMap",
+ "scheme" : "activemq-publish-map",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQPublishMapComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-publish-map-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Publish JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "outputDataType" : "none",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/pom.xml
new file mode 100644
index 0000000..e499907
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-publish-text-connector
+ Syndesis Connectors :: ActiveMQ Publish Text Connector
+ JMS Publish Text Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishTextComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishTextComponent.java
new file mode 100644
index 0000000..5fdbb64
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQPublishTextComponent.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-publish-text connector
+ */
+public class ActiveMQPublishTextComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQPublishTextComponent() {
+ super("activemq-publish-text", ActiveMQPublishTextComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message out = exchange.getIn();
+ JmsTextMessage jmsTextMessage = out.getBody(JmsTextMessage.class);
+ out.setBody(jmsTextMessage.getBody());
+ if (jmsTextMessage.getHeaders() != null) {
+ out.setHeaders(jmsTextMessage.getHeaders());
+ }
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorAutoConfiguration.java
new file mode 100644
index 0000000..ab56ad6
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQPublishTextComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQPublishTextConnectorConfiguration.class)
+public class ActiveMQPublishTextConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQPublishTextConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQPublishTextConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-publish-text-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQPublishTextComponent configureActiveMQPublishTextComponent()
+ throws Exception {
+ ActiveMQPublishTextComponent connector = new ActiveMQPublishTextComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-text.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-text.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQPublishTextComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQPublishTextComponent connector = new ActiveMQPublishTextComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-text."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-publish-text."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfiguration.java
new file mode 100644
index 0000000..95bbc91
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-publish-text")
+public class ActiveMQPublishTextConnectorConfiguration
+ extends
+ ActiveMQPublishTextConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfigurationCommon.java
new file mode 100644
index 0000000..4bbe158
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQPublishTextConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Publish JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQPublishTextConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-text-connector b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-text-connector
new file mode 100644
index 0000000..4066dab
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-publish-text-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQPublishTextComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..35bbc9c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQPublishTextConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..2354012
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-publish-text",
+ "syntax":"activemq-publish-text:destinationType:destinationName",
+ "title":"ActiveMQPublishText",
+ "description":"Publish JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-publish-text-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..7648021
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-publish-text-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQPublishText",
+ "scheme" : "activemq-publish-text",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQPublishTextComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-publish-text-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Publish JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "outputDataType" : "none",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/pom.xml
new file mode 100644
index 0000000..13ece4d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-request-bytes-connector
+ Syndesis Connectors :: ActiveMQ Request Bytes Connector
+ JMS Request Bytes Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestBytesComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestBytesComponent.java
new file mode 100644
index 0000000..00d33b9
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestBytesComponent.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-request-bytes connector
+ */
+public class ActiveMQRequestBytesComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRequestBytesComponent() {
+ super("activemq-request-bytes", ActiveMQRequestBytesComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message in = exchange.getIn();
+ JmsBytesMessage jmsBytesMessage = in.getBody(JmsBytesMessage.class);
+ in.setBody(jmsBytesMessage.getBody());
+ if (jmsBytesMessage.getHeaders() != null) {
+ in.setHeaders(jmsBytesMessage.getHeaders());
+ }
+ });
+
+ setAfterProducer( exchange -> {
+
+ if (!exchange.isFailed()) {
+ // convert to JmsBytesMessage
+ Message in = exchange.getIn();
+ JmsBytesMessage jmsBytesMessage = new JmsBytesMessage(in.getBody(byte[].class));
+ jmsBytesMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsBytesMessage);
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorAutoConfiguration.java
new file mode 100644
index 0000000..b1f7c5f
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRequestBytesComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRequestBytesConnectorConfiguration.class)
+public class ActiveMQRequestBytesConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRequestBytesConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRequestBytesConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-request-bytes-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRequestBytesComponent configureActiveMQRequestBytesComponent()
+ throws Exception {
+ ActiveMQRequestBytesComponent connector = new ActiveMQRequestBytesComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-bytes.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-bytes.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRequestBytesComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRequestBytesComponent connector = new ActiveMQRequestBytesComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-bytes."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-bytes."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfiguration.java
new file mode 100644
index 0000000..83ca5c3
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-request-bytes")
+public class ActiveMQRequestBytesConnectorConfiguration
+ extends
+ ActiveMQRequestBytesConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfigurationCommon.java
new file mode 100644
index 0000000..b26bcf9
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestBytesConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Request JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRequestBytesConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-bytes-connector b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-bytes-connector
new file mode 100644
index 0000000..d3dabfc
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-bytes-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRequestBytesComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..222c962
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRequestBytesConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..371d223
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-request-bytes",
+ "syntax":"activemq-request-bytes:destinationType:destinationName",
+ "title":"ActiveMQRequestBytes",
+ "description":"Request JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-request-bytes-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..15213e7
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-bytes-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRequestBytes",
+ "scheme" : "activemq-request-bytes",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRequestBytesComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-request-bytes-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Request JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/pom.xml
new file mode 100644
index 0000000..4fd4556
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-request-map-connector
+ Syndesis Connectors :: ActiveMQ Request Map Connector
+ JMS Request Map Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestMapComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestMapComponent.java
new file mode 100644
index 0000000..f542a11
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestMapComponent.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-request-map connector
+ */
+public class ActiveMQRequestMapComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRequestMapComponent() {
+ super("activemq-request-map", ActiveMQRequestMapComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message in = exchange.getIn();
+ JmsMapMessage jmsMapMessage = in.getBody(JmsMapMessage.class);
+ in.setBody(jmsMapMessage.getBody());
+ if (jmsMapMessage.getHeaders() != null) {
+ in.setHeaders(jmsMapMessage.getHeaders());
+ }
+ });
+
+ setAfterProducer( exchange -> {
+
+ if (!exchange.isFailed()) {
+ // convert to JmsMapMessage
+ Message in = exchange.getIn();
+ JmsMapMessage jmsMapMessage = new JmsMapMessage(in.getBody(Map.class));
+ jmsMapMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsMapMessage);
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorAutoConfiguration.java
new file mode 100644
index 0000000..e5a4f53
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRequestMapComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRequestMapConnectorConfiguration.class)
+public class ActiveMQRequestMapConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRequestMapConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRequestMapConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-request-map-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRequestMapComponent configureActiveMQRequestMapComponent()
+ throws Exception {
+ ActiveMQRequestMapComponent connector = new ActiveMQRequestMapComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-map.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-map.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRequestMapComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRequestMapComponent connector = new ActiveMQRequestMapComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-map."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-map."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfiguration.java
new file mode 100644
index 0000000..24c661c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-request-map")
+public class ActiveMQRequestMapConnectorConfiguration
+ extends
+ ActiveMQRequestMapConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfigurationCommon.java
new file mode 100644
index 0000000..3059bd0
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestMapConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Request JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRequestMapConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-map-connector b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-map-connector
new file mode 100644
index 0000000..9ffe478
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-map-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRequestMapComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..61e2241
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRequestMapConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..628d8f3
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-request-map",
+ "syntax":"activemq-request-map:destinationType:destinationName",
+ "title":"ActiveMQRequestMap",
+ "description":"Request JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-request-map-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..7cf4743
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-map-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRequestMap",
+ "scheme" : "activemq-request-map",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRequestMapComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-request-map-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Request JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/pom.xml
new file mode 100644
index 0000000..e38c422
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/pom.xml
@@ -0,0 +1,182 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-request-text-connector
+ Syndesis Connectors :: ActiveMQ Request Text Connector
+ JMS Request Text Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+ io.syndesis
+ jms-model
+ 0.5-SNAPSHOT
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+
+
+
+ org.apache.camel
+ camel-sjms2-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ ${spring-boot.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestTextComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestTextComponent.java
new file mode 100644
index 0000000..ef08992
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRequestTextComponent.java
@@ -0,0 +1,61 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-request-text connector
+ */
+public class ActiveMQRequestTextComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRequestTextComponent() {
+ super("activemq-request-text", ActiveMQRequestTextComponent.class.getName());
+
+ setBeforeProducer( (Exchange exchange) -> {
+
+ // extract headers and body
+ Message in = exchange.getIn();
+ JmsTextMessage jmsTextMessage = in.getBody(JmsTextMessage.class);
+ in.setBody(jmsTextMessage.getBody());
+ if (jmsTextMessage.getHeaders() != null) {
+ in.setHeaders(jmsTextMessage.getHeaders());
+ }
+ });
+
+ setAfterProducer( exchange -> {
+
+ if (!exchange.isFailed()) {
+ // convert to JmsTextMessage
+ Message in = exchange.getIn();
+ JmsTextMessage jmsTextMessage = new JmsTextMessage(in.getBody(String.class));
+ jmsTextMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsTextMessage);
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorAutoConfiguration.java
new file mode 100644
index 0000000..9625e5e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRequestTextComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRequestTextConnectorConfiguration.class)
+public class ActiveMQRequestTextConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRequestTextConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRequestTextConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-request-text-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRequestTextComponent configureActiveMQRequestTextComponent()
+ throws Exception {
+ ActiveMQRequestTextComponent connector = new ActiveMQRequestTextComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-text.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-text.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRequestTextComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRequestTextComponent connector = new ActiveMQRequestTextComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-text."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-request-text."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfiguration.java
new file mode 100644
index 0000000..916390b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-request-text")
+public class ActiveMQRequestTextConnectorConfiguration
+ extends
+ ActiveMQRequestTextConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfigurationCommon.java
new file mode 100644
index 0000000..c0214ad
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRequestTextConnectorConfigurationCommon.java
@@ -0,0 +1,325 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * Request JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRequestTextConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Sets the number of consumer listeners used for this endpoint.
+ */
+ private int consumerCount = 1;
+ /**
+ * Sets the durable subscription Id required for durable topics.
+ */
+ private String durableSubscriptionId;
+ /**
+ * Sets whether synchronous processing should be strictly used or Camel is
+ * allowed to use asynchronous processing (if supported).
+ */
+ private boolean synchronous = true;
+ /**
+ * Sets the JMS Message selector syntax.
+ */
+ private String messageSelector;
+ /**
+ * Sets the reply to destination name used for InOut producer endpoints.
+ */
+ private String namedReplyTo;
+ /**
+ * Flag used to enable/disable message persistence.
+ */
+ private boolean persistent = true;
+ /**
+ * Sets the number of producers used for this endpoint.
+ */
+ private int producerCount = 1;
+ /**
+ * Flag used to adjust the Time To Live value of produced messages.
+ */
+ private long ttl = -1L;
+ /**
+ * Whether to allow sending messages with no body. If this option is false
+ * and the message body is null then an JMSException is thrown.
+ */
+ private boolean allowNullBody = true;
+ /**
+ * Whether to prefill the producer connection pool on startup or create
+ * connections lazy when needed.
+ */
+ private boolean prefillPool = true;
+ /**
+ * Sets the amount of time we should wait before timing out a InOut
+ * response.
+ */
+ private long responseTimeOut = 5000L;
+ /**
+ * 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.
+ */
+ private boolean asyncStartListener = false;
+ /**
+ * Whether to stop the consumer message listener asynchronously when
+ * stopping a route.
+ */
+ private boolean asyncStopListener = false;
+ /**
+ * 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.
+ */
+ private boolean includeAllJMSXProperties = false;
+ /**
+ * Specifies whether to use transacted mode
+ */
+ private boolean transacted = false;
+ /**
+ * If transacted sets the number of messages to process before committing a
+ * transaction.
+ */
+ private int transactionBatchCount = -1;
+ /**
+ * Sets timeout (in millis) for batch transactions the value should be 1000
+ * or higher.
+ */
+ private long transactionBatchTimeout = 5000L;
+ /**
+ * 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.
+ */
+ private boolean sharedJMSSession = true;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public int getConsumerCount() {
+ return consumerCount;
+ }
+
+ public void setConsumerCount(int consumerCount) {
+ this.consumerCount = consumerCount;
+ }
+
+ public String getDurableSubscriptionId() {
+ return durableSubscriptionId;
+ }
+
+ public void setDurableSubscriptionId(String durableSubscriptionId) {
+ this.durableSubscriptionId = durableSubscriptionId;
+ }
+
+ public boolean isSynchronous() {
+ return synchronous;
+ }
+
+ public void setSynchronous(boolean synchronous) {
+ this.synchronous = synchronous;
+ }
+
+ public String getMessageSelector() {
+ return messageSelector;
+ }
+
+ public void setMessageSelector(String messageSelector) {
+ this.messageSelector = messageSelector;
+ }
+
+ public String getNamedReplyTo() {
+ return namedReplyTo;
+ }
+
+ public void setNamedReplyTo(String namedReplyTo) {
+ this.namedReplyTo = namedReplyTo;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+
+ public int getProducerCount() {
+ return producerCount;
+ }
+
+ public void setProducerCount(int producerCount) {
+ this.producerCount = producerCount;
+ }
+
+ public long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(long ttl) {
+ this.ttl = ttl;
+ }
+
+ public boolean isAllowNullBody() {
+ return allowNullBody;
+ }
+
+ public void setAllowNullBody(boolean allowNullBody) {
+ this.allowNullBody = allowNullBody;
+ }
+
+ public boolean isPrefillPool() {
+ return prefillPool;
+ }
+
+ public void setPrefillPool(boolean prefillPool) {
+ this.prefillPool = prefillPool;
+ }
+
+ public long getResponseTimeOut() {
+ return responseTimeOut;
+ }
+
+ public void setResponseTimeOut(long responseTimeOut) {
+ this.responseTimeOut = responseTimeOut;
+ }
+
+ public boolean isAsyncStartListener() {
+ return asyncStartListener;
+ }
+
+ public void setAsyncStartListener(boolean asyncStartListener) {
+ this.asyncStartListener = asyncStartListener;
+ }
+
+ public boolean isAsyncStopListener() {
+ return asyncStopListener;
+ }
+
+ public void setAsyncStopListener(boolean asyncStopListener) {
+ this.asyncStopListener = asyncStopListener;
+ }
+
+ public boolean isIncludeAllJMSXProperties() {
+ return includeAllJMSXProperties;
+ }
+
+ public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties) {
+ this.includeAllJMSXProperties = includeAllJMSXProperties;
+ }
+
+ public boolean isTransacted() {
+ return transacted;
+ }
+
+ public void setTransacted(boolean transacted) {
+ this.transacted = transacted;
+ }
+
+ public int getTransactionBatchCount() {
+ return transactionBatchCount;
+ }
+
+ public void setTransactionBatchCount(int transactionBatchCount) {
+ this.transactionBatchCount = transactionBatchCount;
+ }
+
+ public long getTransactionBatchTimeout() {
+ return transactionBatchTimeout;
+ }
+
+ public void setTransactionBatchTimeout(long transactionBatchTimeout) {
+ this.transactionBatchTimeout = transactionBatchTimeout;
+ }
+
+ public boolean isSharedJMSSession() {
+ return sharedJMSSession;
+ }
+
+ public void setSharedJMSSession(boolean sharedJMSSession) {
+ this.sharedJMSSession = sharedJMSSession;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-text-connector b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-text-connector
new file mode 100644
index 0000000..36d2bc0
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-request-text-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRequestTextComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..50c7a44
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRequestTextConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..7da7b2d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,331 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-request-text",
+ "syntax":"activemq-request-text:destinationType:destinationName",
+ "title":"ActiveMQRequestText",
+ "description":"Request JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"null",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-request-text-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ },
+ "consumerCount":{
+ "kind":"parameter",
+ "displayName":"Consumer Count",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of consumer listeners used for this endpoint."
+ },
+ "durableSubscriptionId":{
+ "kind":"parameter",
+ "displayName":"Durable Subscription Id",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the durable subscription Id required for durable topics."
+ },
+ "synchronous":{
+ "kind":"parameter",
+ "displayName":"Synchronous",
+ "group":"consumer",
+ "label":"consumer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported)."
+ },
+ "messageSelector":{
+ "kind":"parameter",
+ "displayName":"Message Selector",
+ "group":"consumer (advanced)",
+ "label":"consumer,advanced",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the JMS Message selector syntax."
+ },
+ "namedReplyTo":{
+ "kind":"parameter",
+ "displayName":"Named Reply To",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Sets the reply to destination name used for InOut producer endpoints."
+ },
+ "persistent":{
+ "kind":"parameter",
+ "displayName":"Persistent",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Flag used to enable\/disable message persistence."
+ },
+ "producerCount":{
+ "kind":"parameter",
+ "displayName":"Producer Count",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"Sets the number of producers used for this endpoint."
+ },
+ "ttl":{
+ "kind":"parameter",
+ "displayName":"Ttl",
+ "group":"producer",
+ "label":"producer",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"Flag used to adjust the Time To Live value of produced messages."
+ },
+ "allowNullBody":{
+ "kind":"parameter",
+ "displayName":"Allow Null Body",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to allow sending messages with no body. If this option is false and the message body is null then an JMSException is thrown."
+ },
+ "prefillPool":{
+ "kind":"parameter",
+ "displayName":"Prefill Pool",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"Whether to prefill the producer connection pool on startup or create connections lazy when needed."
+ },
+ "responseTimeOut":{
+ "kind":"parameter",
+ "displayName":"Response Time Out",
+ "group":"producer (advanced)",
+ "label":"producer,advanced",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets the amount of time we should wait before timing out a InOut response."
+ },
+ "asyncStartListener":{
+ "kind":"parameter",
+ "displayName":"Async Start Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "asyncStopListener":{
+ "kind":"parameter",
+ "displayName":"Async Stop Listener",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Whether to stop the consumer message listener asynchronously when stopping a route."
+ },
+ "includeAllJMSXProperties":{
+ "kind":"parameter",
+ "displayName":"Include All JMSXProperties",
+ "group":"advanced",
+ "label":"advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"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."
+ },
+ "transacted":{
+ "kind":"parameter",
+ "displayName":"Transacted",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":false,
+ "description":"Specifies whether to use transacted mode"
+ },
+ "transactionBatchCount":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Count",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"int",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":-1,
+ "description":"If transacted sets the number of messages to process before committing a transaction."
+ },
+ "transactionBatchTimeout":{
+ "kind":"parameter",
+ "displayName":"Transaction Batch Timeout",
+ "group":"transaction",
+ "label":"consumer,transaction",
+ "required":false,
+ "type":"integer",
+ "javaType":"long",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":5000,
+ "description":"Sets timeout (in millis) for batch transactions the value should be 1000 or higher."
+ },
+ "sharedJMSSession":{
+ "kind":"parameter",
+ "displayName":"Shared JMSSession",
+ "group":"transaction (advanced)",
+ "label":"transaction,advanced",
+ "required":false,
+ "type":"boolean",
+ "javaType":"boolean",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":true,
+ "description":"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."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl":{
+ "kind":"parameter",
+ "displayName":"Broker URL",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Broker URL"
+ },
+ "username":{
+ "kind":"parameter",
+ "displayName":"User Name",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential user name"
+ },
+ "password":{
+ "kind":"parameter",
+ "displayName":"Password",
+ "group":"filter",
+ "label":"producer,filter",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..e6c5971
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-request-text-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRequestText",
+ "scheme" : "activemq-request-text",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRequestTextComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-request-text-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Request JMS Message",
+ "labels" : [ "jms" ],
+ "pattern" : "To",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/pom.xml
new file mode 100644
index 0000000..377efbd
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-respond-bytes-connector
+ Syndesis Connectors :: ActiveMQ Respond Bytes Connector
+ JMS Respond Bytes Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondBytesComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondBytesComponent.java
new file mode 100644
index 0000000..197d608
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondBytesComponent.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-respond-bytes connector
+ */
+public class ActiveMQRespondBytesComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRespondBytesComponent() {
+ super("activemq-respond-bytes", ActiveMQRespondBytesComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsBytesMessage jmsBytesMessage = new JmsBytesMessage(in.getBody(byte[].class));
+ jmsBytesMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsBytesMessage);
+ });
+
+ setAfterConsumer(exchange -> {
+
+ if (!exchange.isFailed()) {
+ final Message in = exchange.getIn();
+ final JmsBytesMessage jmsBytesMessage = in.getBody(JmsBytesMessage.class);
+ in.setBody(jmsBytesMessage.getBody());
+ if (jmsBytesMessage.getHeaders() != null) {
+ in.setHeaders(jmsBytesMessage.getHeaders());
+ }
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorAutoConfiguration.java
new file mode 100644
index 0000000..8f7d2c1
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRespondBytesComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRespondBytesConnectorConfiguration.class)
+public class ActiveMQRespondBytesConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRespondBytesConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRespondBytesConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-respond-bytes-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRespondBytesComponent configureActiveMQRespondBytesComponent()
+ throws Exception {
+ ActiveMQRespondBytesComponent connector = new ActiveMQRespondBytesComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-bytes.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-bytes.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRespondBytesComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRespondBytesComponent connector = new ActiveMQRespondBytesComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-bytes."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-bytes."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfiguration.java
new file mode 100644
index 0000000..2be000b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-respond-bytes")
+public class ActiveMQRespondBytesConnectorConfiguration
+ extends
+ ActiveMQRespondBytesConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfigurationCommon.java
new file mode 100644
index 0000000..c2d8971
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondBytesConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * respond JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRespondBytesConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-bytes-connector b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-bytes-connector
new file mode 100644
index 0000000..2816f99
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-bytes-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRespondBytesComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..adcf981
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRespondBytesConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..19a7449
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-respond-bytes",
+ "syntax":"activemq-respond-bytes:destinationType:destinationName",
+ "title":"ActiveMQRespondBytes",
+ "description":"respond JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQRespondBytesComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-respond-bytes-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..40fe91d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-bytes-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRespondBytes",
+ "scheme" : "activemq-respond-bytes",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRespondBytesComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-respond-bytes-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Respond to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/pom.xml
new file mode 100644
index 0000000..d9e737e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-respond-map-connector
+ Syndesis Connectors :: ActiveMQ Respond Map Connector
+ JMS Respond Map Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondMapComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondMapComponent.java
new file mode 100644
index 0000000..89917b4
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondMapComponent.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-respond-map connector
+ */
+public class ActiveMQRespondMapComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRespondMapComponent() {
+ super("activemq-respond-map", ActiveMQRespondMapComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsMapMessage jmsMapMessage = new JmsMapMessage(in.getBody(Map.class));
+ jmsMapMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsMapMessage);
+ });
+
+ setAfterConsumer(exchange -> {
+
+ if (!exchange.isFailed()) {
+ final Message in = exchange.getIn();
+ final JmsMapMessage jmsMapMessage = in.getBody(JmsMapMessage.class);
+ in.setBody(jmsMapMessage.getBody());
+ if (jmsMapMessage.getHeaders() != null) {
+ in.setHeaders(jmsMapMessage.getHeaders());
+ }
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorAutoConfiguration.java
new file mode 100644
index 0000000..bb7c921
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRespondMapComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRespondMapConnectorConfiguration.class)
+public class ActiveMQRespondMapConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRespondMapConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRespondMapConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-respond-map-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRespondMapComponent configureActiveMQRespondMapComponent()
+ throws Exception {
+ ActiveMQRespondMapComponent connector = new ActiveMQRespondMapComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-map.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-map.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRespondMapComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRespondMapComponent connector = new ActiveMQRespondMapComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-map."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-map."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfiguration.java
new file mode 100644
index 0000000..1ff9973
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-respond-map")
+public class ActiveMQRespondMapConnectorConfiguration
+ extends
+ ActiveMQRespondMapConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfigurationCommon.java
new file mode 100644
index 0000000..d9e1f3c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondMapConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * respond JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRespondMapConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-map-connector b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-map-connector
new file mode 100644
index 0000000..2294fae
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-map-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRespondMapComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..2e77ff5
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRespondMapConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..0677a0b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-respond-map",
+ "syntax":"activemq-respond-map:destinationType:destinationName",
+ "title":"ActiveMQRespondMap",
+ "description":"respond JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQRespondMapComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-respond-map-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..7b2cde9
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-map-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRespondMap",
+ "scheme" : "activemq-respond-map",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRespondMapComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-respond-map-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Respond to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/pom.xml
new file mode 100644
index 0000000..1a5bbd2
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-respond-text-connector
+ Syndesis Connectors :: ActiveMQ Respond Text Connector
+ JMS Respond Text Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondTextComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondTextComponent.java
new file mode 100644
index 0000000..b26539d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQRespondTextComponent.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-respond-text connector
+ */
+public class ActiveMQRespondTextComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQRespondTextComponent() {
+ super("activemq-respond-text", ActiveMQRespondTextComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsTextMessage jmsTextMessage = new JmsTextMessage(in.getBody(String.class));
+ jmsTextMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsTextMessage);
+ });
+
+ setAfterConsumer(exchange -> {
+
+ if (!exchange.isFailed()) {
+ final Message in = exchange.getIn();
+ final JmsTextMessage jmsTextMessage = in.getBody(JmsTextMessage.class);
+ in.setBody(jmsTextMessage.getBody());
+ if (jmsTextMessage.getHeaders() != null) {
+ in.setHeaders(jmsTextMessage.getHeaders());
+ }
+ }
+ });
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+ // set exchange pattern to InOut explicitly
+ options.put("exchangePattern", "InOut");
+ return super.createEndpointUri(scheme, options);
+ }
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorAutoConfiguration.java
new file mode 100644
index 0000000..6129f6b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQRespondTextComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQRespondTextConnectorConfiguration.class)
+public class ActiveMQRespondTextConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQRespondTextConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQRespondTextConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-respond-text-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQRespondTextComponent configureActiveMQRespondTextComponent()
+ throws Exception {
+ ActiveMQRespondTextComponent connector = new ActiveMQRespondTextComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-text.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-text.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQRespondTextComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQRespondTextComponent connector = new ActiveMQRespondTextComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-text."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-respond-text."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfiguration.java
new file mode 100644
index 0000000..d764f19
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-respond-text")
+public class ActiveMQRespondTextConnectorConfiguration
+ extends
+ ActiveMQRespondTextConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfigurationCommon.java
new file mode 100644
index 0000000..2f35ca3
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQRespondTextConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * respond JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQRespondTextConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-text-connector b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-text-connector
new file mode 100644
index 0000000..37d0ef9
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-respond-text-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQRespondTextComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..17d06b9
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQRespondTextConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..9beb3fb
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-respond-text",
+ "syntax":"activemq-respond-text:destinationType:destinationName",
+ "title":"ActiveMQRespondText",
+ "description":"respond JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQRespondTextComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-respond-text-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..0faca8e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-respond-text-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQRespondText",
+ "scheme" : "activemq-respond-text",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQRespondTextComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-respond-text-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Respond to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/pom.xml
new file mode 100644
index 0000000..72a0d0c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-subscribe-bytes-connector
+ Syndesis Connectors :: ActiveMQ Subscribe Bytes Connector
+ JMS Subscribe Bytes Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeBytesComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeBytesComponent.java
new file mode 100644
index 0000000..8ab43a6
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeBytesComponent.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-subscribe-bytes connector
+ */
+public class ActiveMQSubscribeBytesComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQSubscribeBytesComponent() {
+ super("activemq-subscribe-bytes", ActiveMQSubscribeBytesComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsBytesMessage jmsBytesMessage = new JmsBytesMessage(in.getBody(byte[].class));
+ jmsBytesMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsBytesMessage);
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorAutoConfiguration.java
new file mode 100644
index 0000000..41768ca
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQSubscribeBytesComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQSubscribeBytesConnectorConfiguration.class)
+public class ActiveMQSubscribeBytesConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQSubscribeBytesConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQSubscribeBytesConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-subscribe-bytes-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQSubscribeBytesComponent configureActiveMQSubscribeBytesComponent()
+ throws Exception {
+ ActiveMQSubscribeBytesComponent connector = new ActiveMQSubscribeBytesComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-bytes.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-bytes.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQSubscribeBytesComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQSubscribeBytesComponent connector = new ActiveMQSubscribeBytesComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-bytes."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-bytes."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfiguration.java
new file mode 100644
index 0000000..baa781a
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-subscribe-bytes")
+public class ActiveMQSubscribeBytesConnectorConfiguration
+ extends
+ ActiveMQSubscribeBytesConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfigurationCommon.java
new file mode 100644
index 0000000..2a2a708
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeBytesConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * subscribe JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQSubscribeBytesConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-bytes-connector b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-bytes-connector
new file mode 100644
index 0000000..83478f3
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-bytes-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQSubscribeBytesComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..9981a77
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQSubscribeBytesConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..cfd82d8
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-subscribe-bytes",
+ "syntax":"activemq-subscribe-bytes:destinationType:destinationName",
+ "title":"ActiveMQSubscribeBytes",
+ "description":"subscribe JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQSubscribeBytesComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-subscribe-bytes-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..36a0c0d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-bytes-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQSubscribeBytes",
+ "scheme" : "activemq-subscribe-bytes",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQSubscribeBytesComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-subscribe-bytes-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Subscribe to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "none",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsBytesMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/pom.xml
new file mode 100644
index 0000000..377e4ed
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-subscribe-map-connector
+ Syndesis Connectors :: ActiveMQ Subscribe Map Connector
+ JMS Subscribe Map Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeMapComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeMapComponent.java
new file mode 100644
index 0000000..cce3f0a
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeMapComponent.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.util.Map;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-subscribe-map connector
+ */
+public class ActiveMQSubscribeMapComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQSubscribeMapComponent() {
+ super("activemq-subscribe-map", ActiveMQSubscribeMapComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsMapMessage jmsMapMessage = new JmsMapMessage(in.getBody(Map.class));
+ jmsMapMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsMapMessage);
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorAutoConfiguration.java
new file mode 100644
index 0000000..44b306f
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQSubscribeMapComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQSubscribeMapConnectorConfiguration.class)
+public class ActiveMQSubscribeMapConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQSubscribeMapConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQSubscribeMapConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-subscribe-map-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQSubscribeMapComponent configureActiveMQSubscribeMapComponent()
+ throws Exception {
+ ActiveMQSubscribeMapComponent connector = new ActiveMQSubscribeMapComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-map.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-map.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQSubscribeMapComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQSubscribeMapComponent connector = new ActiveMQSubscribeMapComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-map."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-map."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfiguration.java
new file mode 100644
index 0000000..53a7a1c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-subscribe-map")
+public class ActiveMQSubscribeMapConnectorConfiguration
+ extends
+ ActiveMQSubscribeMapConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfigurationCommon.java
new file mode 100644
index 0000000..1cabd1d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeMapConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * subscribe JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQSubscribeMapConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-map-connector b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-map-connector
new file mode 100644
index 0000000..515a909
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-map-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQSubscribeMapComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..c02d6f0
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQSubscribeMapConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..4a85002
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-subscribe-map",
+ "syntax":"activemq-subscribe-map:destinationType:destinationName",
+ "title":"ActiveMQSubscribeMap",
+ "description":"subscribe JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQSubscribeMapComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-subscribe-map-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..80a2e8b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-map-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQSubscribeMap",
+ "scheme" : "activemq-subscribe-map",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQSubscribeMapComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-subscribe-map-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Subscribe to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "none",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsMapMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/pom.xml b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/pom.xml
new file mode 100644
index 0000000..61f095f
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/pom.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+ io.syndesis
+ activemq-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-subscribe-text-connector
+ Syndesis Connectors :: ActiveMQ Subscribe Text Connector
+ JMS Subscribe Text Connector
+ jar
+
+
+
+
+
+ org.apache.camel
+ camel-parent
+ ${camel.version}
+ import
+ pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-jms
+
+
+
+ org.apache.camel
+ camel-jms-starter
+
+
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.camel
+ camel-connector
+
+
+
+
+ org.apache.camel
+ apt
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+
+ ${project.groupId}
+ jms-model
+ ${project.version}
+
+
+
+
+
+ install
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.0.1
+
+ UTF-8
+
+
+
+
+
+ org.apache.camel
+ camel-package-maven-plugin
+ ${camel.version}
+
+
+ prepare
+
+ prepare-components
+
+ generate-resources
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+ default-jar
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-connector-maven-plugin
+ ${camel.version}
+
+
+ boot
+
+ prepare-spring-boot-auto-configuration
+
+
+
+ false
+
+ false
+
+
+
+ connector
+
+ jar
+
+
+
+
+
+
+
+
+
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeTextComponent.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeTextComponent.java
new file mode 100644
index 0000000..89e149e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/ActiveMQSubscribeTextComponent.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import org.apache.camel.Message;
+
+/**
+ * Camel activemq-subscribe-text connector
+ */
+public class ActiveMQSubscribeTextComponent extends AbstractActiveMQConnector {
+
+ public ActiveMQSubscribeTextComponent() {
+ super("activemq-subscribe-text", ActiveMQSubscribeTextComponent.class.getName());
+
+ // create JmsMessage from Camel message
+ setBeforeConsumer(exchange -> {
+ final Message in = exchange.getIn();
+ final JmsTextMessage jmsTextMessage = new JmsTextMessage(in.getBody(String.class));
+ jmsTextMessage.setHeaders(in.getHeaders());
+ in.setBody(jmsTextMessage);
+ });
+ }
+
+}
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorAutoConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorAutoConfiguration.java
new file mode 100644
index 0000000..0965807
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorAutoConfiguration.java
@@ -0,0 +1,133 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import javax.annotation.PostConstruct;
+import io.syndesis.connector.jms.ActiveMQSubscribeTextComponent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.connector.ConnectorCustomizer;
+import org.apache.camel.spi.HasId;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.apache.camel.util.IntrospectionSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-connector-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@Configuration
+@ConditionalOnBean(type = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@AutoConfigureAfter(name = "org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(ActiveMQSubscribeTextConnectorConfiguration.class)
+public class ActiveMQSubscribeTextConnectorAutoConfiguration {
+
+ private static final Logger LOGGER = LoggerFactory
+ .getLogger(ActiveMQSubscribeTextConnectorAutoConfiguration.class);
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Autowired
+ private CamelContext camelContext;
+ @Autowired
+ private ActiveMQSubscribeTextConnectorConfiguration configuration;
+ @Autowired(required = false)
+ private List> customizers;
+
+ @Lazy
+ @Bean(name = "activemq-subscribe-text-component")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean
+ public ActiveMQSubscribeTextComponent configureActiveMQSubscribeTextComponent()
+ throws Exception {
+ ActiveMQSubscribeTextComponent connector = new ActiveMQSubscribeTextComponent();
+ connector.setCamelContext(camelContext);
+ Map parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ CamelPropertiesHelper.setCamelProperties(camelContext, connector,
+ parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator
+ .evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-text.customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator
+ .evaluate(applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-text.customizer");
+ if (useCustomizer) {
+ LOGGER.debug("Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ return connector;
+ }
+
+ @PostConstruct
+ public void postConstructActiveMQSubscribeTextComponent() {
+ Map parameters = new HashMap<>();
+ for (Map.Entry entry : configuration
+ .getConfigurations().entrySet()) {
+ parameters.clear();
+ ActiveMQSubscribeTextComponent connector = new ActiveMQSubscribeTextComponent();
+ connector.setCamelContext(camelContext);
+ try {
+ IntrospectionSupport.getProperties(entry.getValue(),
+ parameters, null, false);
+ CamelPropertiesHelper.setCamelProperties(camelContext,
+ connector, parameters, false);
+ connector.setOptions(parameters);
+ if (ObjectHelper.isNotEmpty(customizers)) {
+ for (ConnectorCustomizer customizer : customizers) {
+ boolean useCustomizer = (customizer instanceof HasId)
+ ? HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-text."
+ + entry.getKey()
+ + ".customizer",
+ ((HasId) customizer).getId())
+ : HierarchicalPropertiesEvaluator.evaluate(
+ applicationContext.getEnvironment(),
+ "camel.connector.customizer",
+ "camel.connector.activemq-subscribe-text."
+ + entry.getKey()
+ + ".customizer");
+ if (useCustomizer) {
+ LOGGER.debug(
+ "Configure connector {}, with customizer {}",
+ connector, customizer);
+ customizer.customize(connector);
+ }
+ }
+ }
+ camelContext.addComponent(entry.getKey(), connector);
+ } catch (Exception e) {
+ throw new BeanCreationException(entry.getKey(), e.getMessage(),
+ e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfiguration.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfiguration.java
new file mode 100644
index 0000000..02d265d
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfiguration.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+@ConfigurationProperties(prefix = "activemq-subscribe-text")
+public class ActiveMQSubscribeTextConnectorConfiguration
+ extends
+ ActiveMQSubscribeTextConnectorConfigurationCommon {
+
+ /**
+ * Define additional configuration definitions
+ */
+ private Map configurations = new HashMap<>();
+
+ public Map getConfigurations() {
+ return configurations;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfigurationCommon.java b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfigurationCommon.java
new file mode 100644
index 0000000..e59d049
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/java/io/syndesis/connector/jms/springboot/ActiveMQSubscribeTextConnectorConfigurationCommon.java
@@ -0,0 +1,87 @@
+package io.syndesis.connector.jms.springboot;
+
+import javax.annotation.Generated;
+
+/**
+ * subscribe JMS Message
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.connector.SpringBootAutoConfigurationMojo")
+public class ActiveMQSubscribeTextConnectorConfigurationCommon {
+
+ /**
+ * The maximum number of connections available to endpoints started under
+ * this component
+ */
+ private Integer connectionCount = 1;
+ /**
+ * The kind of destination to use
+ */
+ private String destinationType = "queue";
+ /**
+ * DestinationName is a JMS queue or topic name. By default the
+ * destinationName is interpreted as a queue name.
+ */
+ private String destinationName;
+ /**
+ * Broker URL
+ */
+ private String brokerUrl;
+ /**
+ * Authorization credential user name
+ */
+ private String username;
+ /**
+ * Authorization credential password
+ */
+ private String password;
+
+ public Integer getConnectionCount() {
+ return connectionCount;
+ }
+
+ public void setConnectionCount(Integer connectionCount) {
+ this.connectionCount = connectionCount;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-text-connector b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-text-connector
new file mode 100644
index 0000000..ebb09f1
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/services/org/apache/camel/component/activemq-subscribe-text-connector
@@ -0,0 +1 @@
+class=io.syndesis.connector.jms.ActiveMQSubscribeTextComponent
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/spring.factories b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..6fcd166
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+io.syndesis.connector.jms.springboot.ActiveMQSubscribeTextConnectorAutoConfiguration
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector-schema.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector-schema.json
new file mode 100644
index 0000000..8e4b78c
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector-schema.json
@@ -0,0 +1,100 @@
+{
+ "component":{
+ "kind":"component",
+ "baseScheme":"sjms2",
+ "scheme":"activemq-subscribe-text",
+ "syntax":"activemq-subscribe-text:destinationType:destinationName",
+ "title":"ActiveMQSubscribeText",
+ "description":"subscribe JMS Message",
+ "label":"jms",
+ "deprecated":false,
+ "async":true,
+ "producerOnly":true,
+ "lenientProperties":false,
+ "javaType":"io.syndesis.connector.jms.ActiveMQSubscribeTextComponent",
+ "groupId":"io.syndesis",
+ "artifactId":"activemq-subscribe-text-connector",
+ "version":"0.5-SNAPSHOT"
+ },
+ "componentProperties":{
+ "connectionCount":{
+ "kind":"property",
+ "displayName":"Connection Count",
+ "group":"common",
+ "required":false,
+ "type":"integer",
+ "javaType":"java.lang.Integer",
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":1,
+ "description":"The maximum number of connections available to endpoints started under this component"
+ }
+ },
+ "properties":{
+ "destinationType":{
+ "kind":"path",
+ "displayName":"Destination Type",
+ "group":"common",
+ "required":false,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "enum":[
+ "topic",
+ "queue"
+ ],
+ "deprecated":false,
+ "secret":false,
+ "defaultValue":"queue",
+ "description":"The kind of destination to use"
+ },
+ "destinationName":{
+ "kind":"path",
+ "displayName":"Destination Name",
+ "group":"common",
+ "required":true,
+ "type":"string",
+ "javaType":"java.lang.String",
+ "deprecated":false,
+ "secret":false,
+ "description":"DestinationName is a JMS queue or topic name. By default the destinationName is interpreted as a queue name."
+ }
+ },
+ "connectorProperties":{
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector.json b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector.json
new file mode 100644
index 0000000..a0fb10b
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/activemq-subscribe-text-connector/src/main/resources/camel-connector.json
@@ -0,0 +1,59 @@
+{
+ "baseScheme" : "sjms2",
+ "baseGroupId" : "org.apache.camel",
+ "baseArtifactId" : "camel-sjms2",
+ "baseVersion" : "2.20.0",
+ "baseJavaType" : "org.apache.camel.component.sjms2.Sjms2Component",
+ "name" : "ActiveMQSubscribeText",
+ "scheme" : "activemq-subscribe-text",
+ "javaType" : "io.syndesis.connector.jms.ActiveMQSubscribeTextComponent",
+ "groupId" : "io.syndesis",
+ "artifactId" : "activemq-subscribe-text-connector",
+ "version" : "0.5-SNAPSHOT",
+ "description" : "Subscribe to JMS Destination",
+ "labels" : [ "jms" ],
+ "pattern" : "From",
+ "inputDataType" : "none",
+ "outputDataType" : "java:io.syndesis.connector.jms.JmsTextMessage",
+ "globalOptions" : [ "brokerUrl", "username", "password" ],
+ "componentOptions" : [ "connectionCount" ],
+ "endpointOptions" : [ "destinationType", "destinationName", "synchronous", "includeAllJMSXProperties", "transacted", "sharedJMSSession", "namedReplyTo", "sessionCount", "producerCount", "consumerCount", "ttl", "persistent", "durableSubscriptionId", "responseTimeOut", "messageSelector", "transactionBatchCount", "transactionBatchTimeout", "asyncStartListener", "asyncStopListener", "prefillPool", "allowNullBody", "subscriptionId", "durable", "shared" ],
+ "connectorProperties" : {
+ "brokerUrl": {
+ "kind" : "parameter",
+ "displayName" : "Broker URL",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : true,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Broker URL"
+ },
+ "username": {
+ "kind" : "parameter",
+ "displayName" : "User Name",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential user name"
+ },
+ "password": {
+ "kind" : "parameter",
+ "displayName" : "Password",
+ "group" : "filter",
+ "label" : "producer,filter",
+ "required" : false,
+ "type" : "string",
+ "javaType" : "java.lang.String",
+ "deprecated" : false,
+ "secret" : false,
+ "description" : "Authorization credential password"
+ }
+ }
+}
\ No newline at end of file
diff --git a/connectors/jms-connectors/activemq-connectors/pom.xml b/connectors/jms-connectors/activemq-connectors/pom.xml
new file mode 100644
index 0000000..c9b398e
--- /dev/null
+++ b/connectors/jms-connectors/activemq-connectors/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+
+ io.syndesis
+ jms-connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-connectors
+ Syndesis Connectors :: JMS ActiveMQ Connectors
+ pom
+
+
+ activemq-publish-bytes-connector
+ activemq-publish-map-connector
+ activemq-publish-text-connector
+ activemq-request-bytes-connector
+ activemq-request-map-connector
+ activemq-request-text-connector
+ activemq-respond-bytes-connector
+ activemq-respond-map-connector
+ activemq-respond-text-connector
+ activemq-subscribe-bytes-connector
+ activemq-subscribe-map-connector
+ activemq-subscribe-text-connector
+
+
+
diff --git a/connectors/jms-connectors/jms-model/pom.xml b/connectors/jms-connectors/jms-model/pom.xml
new file mode 100644
index 0000000..75f4a3d
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/pom.xml
@@ -0,0 +1,77 @@
+
+
+
+
+ 4.0.0
+
+
+ io.syndesis
+ jms-connectors
+ 0.5-SNAPSHOT
+
+
+ jms-model
+ Syndesis Connectors :: JMS Model
+ JMS Model used by JMS connectors
+
+
+ UTF-8
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.6.0
+
+
+ 1.8
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-sjms2
+ ${camel.version}
+ provided
+
+
+ org.apache.activemq
+ activemq-client
+ provided
+
+
+ org.apache.camel
+ camel-connector
+ ${camel.version}
+ provided
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+
diff --git a/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractActiveMQConnector.java b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractActiveMQConnector.java
new file mode 100644
index 0000000..9ba7340
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractActiveMQConnector.java
@@ -0,0 +1,84 @@
+package io.syndesis.connector.jms;
+
+import java.net.URISyntaxException;
+import java.util.Map;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.camel.component.connector.DefaultConnectorComponent;
+import org.apache.camel.component.sjms2.Sjms2Component;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.util.ObjectHelper;
+
+/**
+ * Base class for ActiveMQ connectors
+ */
+public abstract class AbstractActiveMQConnector extends DefaultConnectorComponent {
+
+ @Metadata(label = "basic", description = "ActiveMQ Broker URL")
+ private String brokerUrl;
+
+ @Metadata(label = "basic", description = "User name for authorization credential")
+ private String username;
+
+ @Metadata(label = "basic", description = "Password for authorization credential")
+ private String password;
+
+ public AbstractActiveMQConnector(String componentName, String className) {
+ super(componentName, className);
+ }
+
+ @Override
+ public String createEndpointUri(String scheme, Map options) throws URISyntaxException {
+
+ // FIXME: SpringBootAutoConfigurationMojo MUST not ignore connectorOptions
+ brokerUrl = options.remove("brokerUrl");
+ username = options.remove("username");
+ password = options.remove("password");
+
+ // validate url
+ if (ObjectHelper.isEmpty(this.brokerUrl)) {
+ throw new IllegalArgumentException("Missing required property brokerUrl");
+ }
+
+ // create ActiveMQ Connection Factory
+ ActiveMQConnectionFactory connectionFactory = ObjectHelper.isEmpty(username) ?
+ new ActiveMQConnectionFactory(this.brokerUrl) : new ActiveMQConnectionFactory(username, password, this.brokerUrl);
+ Sjms2Component delegate = getCamelContext().getComponent(getComponentName() + "-component", Sjms2Component.class);
+ delegate.setConnectionFactory(connectionFactory);
+
+ return super.createEndpointUri(scheme, options);
+ }
+
+ public String getBrokerUrl() {
+ return brokerUrl;
+ }
+
+ /**
+ * ActiveMQ Broker URL.
+ */
+ public void setBrokerUrl(String brokerUrl) {
+ this.brokerUrl = brokerUrl;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ /**
+ * ActiveMQ Broker username.
+ */
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * ActiveMQ Broker password.
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
diff --git a/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractJmsMessage.java b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractJmsMessage.java
new file mode 100644
index 0000000..db652cc
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/AbstractJmsMessage.java
@@ -0,0 +1,22 @@
+package io.syndesis.connector.jms;
+
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Base class for JMS Wrapper Messages.
+ */
+public abstract class AbstractJmsMessage {
+
+ @JsonProperty("Headers")
+ private Map headers;
+
+ public Map getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(Map headers) {
+ this.headers = headers;
+ }
+}
diff --git a/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsBytesMessage.java b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsBytesMessage.java
new file mode 100644
index 0000000..3927a31
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsBytesMessage.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class JmsBytesMessage {
+
+ @JsonProperty("Body")
+ private byte[] body;
+
+ @JsonProperty("Headers")
+ private Map headers;
+
+ public JmsBytesMessage(byte[] body) {
+ this.body = body;
+ }
+
+ public byte[] getBody() {
+ return body;
+ }
+
+ public void setBody(final byte[] body) {
+ this.body = body;
+ }
+
+ public Map getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(Map headers) {
+ this.headers = headers;
+ }
+
+ @Override
+ public String toString() {
+ return body != null ? body.toString() : "null";
+ }
+}
diff --git a/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsMapMessage.java b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsMapMessage.java
new file mode 100644
index 0000000..5927c0d
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsMapMessage.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class JmsMapMessage {
+
+ @JsonProperty("Body")
+ private Map body;
+
+ @JsonProperty("Headers")
+ private Map headers;
+
+ public JmsMapMessage(Map body) {
+ this.body = body;
+ }
+
+ public Map getBody() {
+ return body;
+ }
+
+ public void setBody(final Map body) {
+ this.body = body;
+ }
+
+ public Map getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(Map headers) {
+ this.headers = headers;
+ }
+
+ @Override
+ public String toString() {
+ return body != null ? body.toString() : "null";
+ }
+}
diff --git a/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsTextMessage.java b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsTextMessage.java
new file mode 100644
index 0000000..d2fbf08
--- /dev/null
+++ b/connectors/jms-connectors/jms-model/src/main/java/io/syndesis/connector/jms/JmsTextMessage.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.connector.jms;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class JmsTextMessage extends AbstractJmsMessage {
+
+ @JsonProperty("Body")
+ private String body;
+
+ public JmsTextMessage(String body) {
+ this.body = body;
+ }
+
+ public String getBody() {
+ return body;
+ }
+
+ public void setBody(final String body) {
+ this.body = body;
+ }
+
+ @Override
+ public String toString() {
+ return body;
+ }
+}
diff --git a/connectors/jms-connectors/pom.xml b/connectors/jms-connectors/pom.xml
new file mode 100644
index 0000000..185d21a
--- /dev/null
+++ b/connectors/jms-connectors/pom.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ io.syndesis
+ connectors
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ jms-connectors
+ Syndesis Connectors :: JMS Connectors
+ pom
+
+
+ jms-model
+ activemq-connectors
+
+
+
diff --git a/connectors/pom.xml b/connectors/pom.xml
index e074535..1ba086c 100644
--- a/connectors/pom.xml
+++ b/connectors/pom.xml
@@ -38,6 +38,7 @@
sql
day-trade
trade-insight
+ jms-connectors
diff --git a/examples/activemq-publish-subscribe-example/pom.xml b/examples/activemq-publish-subscribe-example/pom.xml
new file mode 100644
index 0000000..d8fc1cb
--- /dev/null
+++ b/examples/activemq-publish-subscribe-example/pom.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+ io.syndesis
+ examples
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ jms-publish-subscribe-example
+ Syndesis Connectors :: JMS Publish Subscribe Example
+ Periodically publish to and read from JMS Queue
+ jar
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring-boot.version}
+ pom
+ import
+
+
+ org.apache.camel
+ camel-spring-boot-dependencies
+ ${camel.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-undertow
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ io.syndesis
+ timer-connector
+ ${project.version}
+
+
+ io.syndesis
+ activemq-publish-text-connector
+ ${project.version}
+
+
+ io.syndesis
+ activemq-subscribe-text-connector
+ ${project.version}
+
+
+
+
+ org.apache.activemq
+ activemq-broker
+
+
+
+
+ org.apache.camel
+ camel-test
+ ${camel.version}
+ test
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeApplication.java b/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeApplication.java
new file mode 100644
index 0000000..71afb3a
--- /dev/null
+++ b/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeApplication.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class PublishSubscribeApplication {
+
+ /**
+ * A main method to start this application.
+ */
+ public static void main(String[] args) {
+ SpringApplication.run(PublishSubscribeApplication.class, args);
+ }
+}
+
diff --git a/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeRoute.java b/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeRoute.java
new file mode 100644
index 0000000..83e37c7
--- /dev/null
+++ b/examples/activemq-publish-subscribe-example/src/main/java/io/syndesis/example/PublishSubscribeRoute.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.example;
+
+import java.util.Date;
+
+import io.syndesis.connector.jms.JmsTextMessage;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.stereotype.Component;
+
+@Component
+public class PublishSubscribeRoute extends RouteBuilder {
+
+ @Override
+ public void configure() throws Exception {
+
+ // subscribe route
+ from("activemq-subscribe-text-connector:hello?brokerUrl=RAW(vm://broker?broker.persistent=false&broker.useJmx=false)")
+ .log("Received body ${body.body}");
+
+ // publish route
+ from("periodic-timer-connector")
+ .log("Timer is triggered")
+ .setBody(constant(new JmsTextMessage("Hello at " + new Date())))
+ .to("activemq-publish-text-connector:hello?brokerUrl=RAW(vm://broker?broker.persistent=false&broker.useJmx=false)");
+ }
+}
diff --git a/examples/activemq-publish-subscribe-example/src/main/resources/application.properties b/examples/activemq-publish-subscribe-example/src/main/resources/application.properties
new file mode 100644
index 0000000..b75f0da
--- /dev/null
+++ b/examples/activemq-publish-subscribe-example/src/main/resources/application.properties
@@ -0,0 +1,8 @@
+## name of CamelContext
+camel.springboot.name=publishsubscribe
+
+## global options of the JMS Publish connector
+activemq-publish-text-connector.brokerUrl=vm://broker?broker.persistent=false&broker.useJmx=false
+
+## global options of the JMS Subscribe connector
+activemq-subscribe-text-connector.brokerUrl=vm://broker?broker.persistent=false&broker.useJmx=false
diff --git a/examples/activemq-request-response-example/pom.xml b/examples/activemq-request-response-example/pom.xml
new file mode 100644
index 0000000..92a33a8
--- /dev/null
+++ b/examples/activemq-request-response-example/pom.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+ io.syndesis
+ examples
+ 0.5-SNAPSHOT
+
+ 4.0.0
+
+ activemq-request-response-example
+ Syndesis Connectors :: JMS Request Response Example
+ Periodically request and respond to messages on JMS Queue
+ jar
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring-boot.version}
+ pom
+ import
+
+
+ org.apache.camel
+ camel-spring-boot-dependencies
+ ${camel.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-undertow
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ io.syndesis
+ timer-connector
+ ${project.version}
+
+
+ io.syndesis
+ activemq-request-text-connector
+ ${project.version}
+
+
+ io.syndesis
+ activemq-respond-text-connector
+ ${project.version}
+
+
+
+
+ org.apache.activemq
+ activemq-broker
+
+
+
+
+ org.apache.camel
+ camel-test
+ ${camel.version}
+ test
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseApplication.java b/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseApplication.java
new file mode 100644
index 0000000..f9f022b
--- /dev/null
+++ b/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseApplication.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class RequestResponseApplication {
+
+ /**
+ * A main method to start this application.
+ */
+ public static void main(String[] args) {
+ SpringApplication.run(RequestResponseApplication.class, args);
+ }
+}
+
diff --git a/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseRoute.java b/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseRoute.java
new file mode 100644
index 0000000..0b33e3a
--- /dev/null
+++ b/examples/activemq-request-response-example/src/main/java/io/syndesis/example/RequestResponseRoute.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (C) 2017 Red Hat, Inc.
+ *
+ * Licensed 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 io.syndesis.example;
+
+import java.util.Date;
+
+import io.syndesis.connector.jms.JmsTextMessage;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.stereotype.Component;
+
+@Component
+public class RequestResponseRoute extends RouteBuilder {
+
+ @Override
+ public void configure() throws Exception {
+
+ // response route
+ from("activemq-respond-text-connector:hello?brokerUrl=RAW(vm://broker?broker.persistent=false&broker.useJmx=false)")
+ .log("Received request '${body.body}'")
+ .setBody(constant(new JmsTextMessage("The time is " + new Date())));
+
+ // request route
+ from("periodic-timer-connector")
+ .log("Timer is triggered")
+ .setBody(constant(new JmsTextMessage("What time is it?")))
+ .to("activemq-request-text-connector:hello?brokerUrl=RAW(vm://broker?broker.persistent=false&broker.useJmx=false)")
+ .log("Response is ${body.body}");
+ }
+}
diff --git a/examples/activemq-request-response-example/src/main/resources/application.properties b/examples/activemq-request-response-example/src/main/resources/application.properties
new file mode 100644
index 0000000..665bf9d
--- /dev/null
+++ b/examples/activemq-request-response-example/src/main/resources/application.properties
@@ -0,0 +1,8 @@
+## name of CamelContext
+camel.springboot.name=requestresponse
+
+## global options of the JMS Publish connector
+activemq-request-text-connector.brokerUrl=vm://broker?broker.persistent=false&broker.useJmx=false
+
+## global options of the JMS Subscribe connector
+activemq-respond-text-connector.brokerUrl=vm://broker?broker.persistent=false&broker.useJmx=false
diff --git a/examples/pom.xml b/examples/pom.xml
index 8e43e67..fee1002 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -31,6 +31,8 @@
http-pull-push-example
+ activemq-publish-subscribe-example
+ activemq-request-response-example
twitter-salesforce-example
trade-buy-place-example
twitter-search-example