-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…enhancements
- Loading branch information
Showing
81 changed files
with
1,392 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-common-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
<relativePath>../../common-parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>quarkus-integration-test-artemis-camel-jms-common</artifactId> | ||
<name>Quarkus - Artemis - Integration Tests - Camel JMS - Common</name> | ||
<description>The Apache ActiveMQ Artemis Camel JMS integration tests common module</description> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
...s/common/src/test/java/io/quarkus/it/artemis/camel/jms/common/BaseSendAndReceiveTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkus.it.artemis.camel.jms.common; | ||
|
||
import static org.hamcrest.Matchers.is; | ||
|
||
import jakarta.ws.rs.core.Response; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import io.restassured.RestAssured; | ||
|
||
public interface BaseSendAndReceiveTest { | ||
@Test | ||
default void test() { | ||
String body = "body"; | ||
RestAssured.given().body(body) | ||
.when().post() | ||
.then().statusCode(is(Response.Status.OK.getStatusCode())).body(is(body)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-artemis-integration-tests-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>quarkus-integration-test-artemis-camel-jms-parent</artifactId> | ||
<name>Quarkus - Artemis - Integration Tests - Camel JMS Parent</name> | ||
<description>The Apache ActiveMQ Artemis Camel JMS integration tests parent module</description> | ||
|
||
<packaging>pom</packaging> | ||
<modules> | ||
<module>common</module> | ||
<module>with-default</module> | ||
<module>with-default-and-named</module> | ||
<module>with-external</module> | ||
<module>with-named</module> | ||
<module>with-named-and-external</module> | ||
</modules> | ||
|
||
<properties> | ||
<maven.compiler.source>17</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus.platform</groupId> | ||
<artifactId>quarkus-camel-bom</artifactId> | ||
<version>${camel-quarkus.platform.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<!-- Artemis --> | ||
<dependency> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-artemis-jms</artifactId> | ||
</dependency> | ||
|
||
<!-- Camel Quarkus --> | ||
<dependency> | ||
<groupId>org.apache.camel.quarkus</groupId> | ||
<artifactId>camel-quarkus-jms</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-common</artifactId> | ||
<classifier>tests</classifier> | ||
<type>test-jar</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-jms-common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-jms-common</artifactId> | ||
<classifier>tests</classifier> | ||
<type>test-jar</type> | ||
</dependency> | ||
</dependencies> | ||
</project> |
23 changes: 23 additions & 0 deletions
23
integration-tests/camel-jms/with-default-and-named/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-camel-jms-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>quarkus-integration-test-artemis-camel-jms-with-default-and-named</artifactId> | ||
<name>Quarkus - Artemis - Integration Tests - Camel JMS - With default and named configuration</name> | ||
<description>The Apache ActiveMQ Artemis Camel JMS integration tests with default and named configuration module</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkiverse.artemis</groupId> | ||
<artifactId>quarkus-integration-test-artemis-camel-jms-common</artifactId> | ||
<classifier>tests</classifier> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
32 changes: 32 additions & 0 deletions
32
...ed/src/main/java/io/quarkus/it/artemis/camel/jms/withdefaultandnamed/ArtemisEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.quarkus.it.artemis.camel.jms.withdefaultandnamed; | ||
|
||
import jakarta.ws.rs.Consumes; | ||
import jakarta.ws.rs.POST; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
|
||
import io.quarkus.it.artemis.jms.common.ArtemisJmsConsumerManager; | ||
import io.quarkus.it.artemis.jms.common.ArtemisJmsProducerManager; | ||
import io.smallrye.common.annotation.Identifier; | ||
|
||
@Path("send-and-receive") | ||
@Consumes(MediaType.TEXT_PLAIN) | ||
@Produces(MediaType.TEXT_PLAIN) | ||
public class ArtemisEndpoint { | ||
private final ArtemisJmsProducerManager defaultProducerManager; | ||
private final ArtemisJmsConsumerManager namedConsumerManager; | ||
|
||
public ArtemisEndpoint( | ||
ArtemisJmsProducerManager defaultProducerManager, | ||
@Identifier("named") ArtemisJmsConsumerManager namedConsumerManager) { | ||
this.defaultProducerManager = defaultProducerManager; | ||
this.namedConsumerManager = namedConsumerManager; | ||
} | ||
|
||
@POST | ||
public String sendAndReceive(String message) { | ||
defaultProducerManager.send(message); | ||
return namedConsumerManager.receive(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...named/src/main/java/io/quarkus/it/artemis/camel/jms/withdefaultandnamed/BeanProducer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.quarkus.it.artemis.camel.jms.withdefaultandnamed; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.enterprise.inject.Produces; | ||
import jakarta.jms.ConnectionFactory; | ||
|
||
import io.quarkus.it.artemis.jms.common.ArtemisJmsConsumerManager; | ||
import io.quarkus.it.artemis.jms.common.ArtemisJmsProducerManager; | ||
import io.smallrye.common.annotation.Identifier; | ||
|
||
public class BeanProducer { | ||
@Produces | ||
@ApplicationScoped | ||
@Identifier("named") | ||
ArtemisJmsConsumerManager namedConsumerManager( | ||
@SuppressWarnings("CdiInjectionPointsInspection") @Identifier("named") ConnectionFactory connectionFactory) { | ||
return new ArtemisJmsConsumerManager(connectionFactory, "out"); | ||
} | ||
|
||
@Produces | ||
@ApplicationScoped | ||
ArtemisJmsProducerManager defaultProducerManager( | ||
@SuppressWarnings("CdiInjectionPointsInspection") ConnectionFactory defaultConnectionFactory) { | ||
return new ArtemisJmsProducerManager(defaultConnectionFactory, "in"); | ||
} | ||
|
||
BeanProducer() { | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...amed/src/main/java/io/quarkus/it/artemis/camel/jms/withdefaultandnamed/TransferRoute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.quarkus.it.artemis.camel.jms.withdefaultandnamed; | ||
|
||
import static org.apache.camel.builder.endpoint.StaticEndpointBuilders.jms; | ||
|
||
import org.apache.camel.builder.RouteConfigurationBuilder; | ||
|
||
@SuppressWarnings("unused") | ||
public class TransferRoute extends RouteConfigurationBuilder { | ||
|
||
@Override | ||
public void configuration() { | ||
from(jms("queue:in").connectionFactory("<default>")) | ||
.to(jms("queue:out").connectionFactory("named")); | ||
} | ||
} |
Oops, something went wrong.