diff --git a/testsuite/integration/microprofile/pom.xml b/testsuite/integration/microprofile/pom.xml
index 48a8030d9f71..f85c486ab01b 100644
--- a/testsuite/integration/microprofile/pom.xml
+++ b/testsuite/integration/microprofile/pom.xml
@@ -200,6 +200,14 @@
test
+
+
+ io.smallrye.reactive
+ smallrye-reactive-messaging-in-memory
+ ${version.io.smallrye.smallrye-reactive-messaging}
+ test
+
+
io.smallrye.reactive
diff --git a/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InDepthMetadataBean.java b/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InDepthMetadataBean.java
deleted file mode 100644
index 30c27eb2f869..000000000000
--- a/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InDepthMetadataBean.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2021, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.wildfly.test.integration.microprofile.reactive.messaging.inmemory;
-
-import io.smallrye.reactive.messaging.kafka.api.IncomingKafkaRecordMetadata;
-import io.smallrye.reactive.messaging.kafka.api.KafkaMetadataUtil;
-import io.smallrye.reactive.messaging.kafka.api.OutgoingKafkaRecordMetadata;
-import jakarta.enterprise.context.ApplicationScoped;
-import org.apache.kafka.common.header.internals.RecordHeader;
-import org.eclipse.microprofile.reactive.messaging.Incoming;
-import org.eclipse.microprofile.reactive.messaging.Message;
-import org.eclipse.microprofile.reactive.messaging.Outgoing;
-import org.eclipse.microprofile.reactive.streams.operators.ReactiveStreams;
-import org.reactivestreams.Publisher;
-
-import java.time.Duration;
-import java.time.Instant;
-import java.time.temporal.ChronoUnit;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.CompletionStage;
-import java.util.concurrent.CountDownLatch;
-
-/**
- * @author Kabir Khan
- */
-@ApplicationScoped
-public class InDepthMetadataBean {
- private final CountDownLatch latch = new CountDownLatch(6);
- private final Map> metadatas = Collections.synchronizedMap(new HashMap<>());
- private final Instant timestampEntry5Topic1 = Instant.now().minus(Duration.ofSeconds(10)).truncatedTo(ChronoUnit.SECONDS);
-
- public CountDownLatch getLatch() {
- return latch;
- }
-
- public Map> getMetadatas() {
- return metadatas;
- }
-
- public Instant getTimestampEntry5Topic1() {
- return timestampEntry5Topic1;
- }
-
- @Outgoing("invm1")
- public Publisher source() {
- return ReactiveStreams.of(1, 2, 3, 4, 5, 6).buildRs();
- }
-
- @Incoming("invm1")
- @Outgoing("to-inmemory1")
- public Message sendToKafka(Integer i) {
- Message msg = Message.of(i);
-
- if (i <= 5) {
- // For 6 we don't want any metadata. If we want to tweak what is set in the metadata use another entry
- OutgoingKafkaRecordMetadata.OutgoingKafkaRecordMetadataBuilder mb = OutgoingKafkaRecordMetadata.builder()
- .withKey("KEY-" + i);
-
- if (i == 5) {
- mb.withHeaders(Collections.singletonList(new RecordHeader("simple", new byte[]{0, 1, 2})));
- mb.withTimestamp(timestampEntry5Topic1);
- }
- msg = KafkaMetadataUtil.writeOutgoingKafkaMetadata(msg, mb.build());
- return msg;
- }
- return msg;
- }
-
- @Incoming("from-inmemory1")
- public CompletionStage receiveFromKafka(Message msg) {
- IncomingKafkaRecordMetadata metadata = KafkaMetadataUtil.readIncomingKafkaMetadata(msg).get();
- metadatas.put(msg.getPayload(), metadata);
- latch.countDown();
- return msg.ack();
- }
-}
diff --git a/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InMemoryBean.java b/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InMemoryBean.java
new file mode 100644
index 000000000000..12d9fbd68dfb
--- /dev/null
+++ b/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/InMemoryBean.java
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2021, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.wildfly.test.integration.microprofile.reactive.messaging.inmemory;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import org.eclipse.microprofile.reactive.messaging.Channel;
+import org.eclipse.microprofile.reactive.messaging.Emitter;
+import org.eclipse.microprofile.reactive.messaging.Incoming;
+
+@ApplicationScoped
+public class InMemoryBean {
+
+ private String message;
+
+ @Inject
+ @Channel("to-inmemory")
+ Emitter outgoingEmitter;
+
+ @Incoming("from-inmemory")
+ public void incoming(String message) {
+ this.message = message;
+ }
+
+ public void outgoing(String payload) {
+ outgoingEmitter.send(payload);
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+}
diff --git a/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/ReactiveMessagingInMemoryTestCase.java b/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/ReactiveMessagingInMemoryTestCase.java
new file mode 100644
index 000000000000..734813b8ca3e
--- /dev/null
+++ b/testsuite/integration/microprofile/src/test/java/org/wildfly/test/integration/microprofile/reactive/messaging/inmemory/ReactiveMessagingInMemoryTestCase.java
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2021, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.wildfly.test.integration.microprofile.reactive.messaging.inmemory;
+
+import io.smallrye.reactive.messaging.memory.InMemoryConnector;
+import jakarta.enterprise.inject.Any;
+import jakarta.inject.Inject;
+import org.eclipse.microprofile.reactive.messaging.Message;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.as.arquillian.api.ServerSetup;
+import org.jboss.as.test.shared.CLIServerSetupTask;
+import org.jboss.as.test.shared.TimeoutUtil;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.wildfly.test.integration.microprofile.reactive.EnableReactiveExtensionsSetupTask;
+
+import java.util.List;
+import java.util.PropertyPermission;
+
+import static org.jboss.as.test.shared.integration.ejb.security.PermissionUtils.createPermissionsXmlAsset;
+
+/**
+ * Run with
+ * mvn clean install -DallTests -pl testsuite/integration/microprofile -Dtest=ReactiveMessagingInMemoryUserApiTestCase
+ */
+@RunWith(Arquillian.class)
+@ServerSetup({EnableReactiveExtensionsSetupTask.class})
+public class ReactiveMessagingInMemoryTestCase {
+
+ @Inject
+ InMemoryBean inMemoryBean;
+
+ @Inject
+ @Any
+ InMemoryConnector connector;
+
+ @Deployment
+ public static WebArchive getDeployment() {
+
+ return ShrinkWrap.create(WebArchive.class, "reactive-messaging-connector-inmemory.war")
+ .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
+ .addPackage(ReactiveMessagingInMemoryTestCase.class.getPackage())
+ .addClasses(EnableReactiveExtensionsSetupTask.class, CLIServerSetupTask.class)
+ .addAsWebInfResource(ReactiveMessagingInMemoryTestCase.class.getPackage(), "microprofile-config.properties", "classes/META-INF/microprofile-config.properties")
+ .addClass(TimeoutUtil.class)
+ .addAsManifestResource(createPermissionsXmlAsset(
+ new PropertyPermission(TimeoutUtil.FACTOR_SYS_PROP, "read")
+ ), "permissions.xml");
+ }
+
+ @Test
+ public void testIncomingMessageSendFromInMemoryConnector() throws InterruptedException {
+ connector.source("from-inmemory").send("IncomingTestMessage");
+ Assert.assertEquals("IncomingTestMessage",inMemoryBean.getMessage());
+ }
+
+ @Test
+ public void testOutgoingMessageReceivedByInMemoryConnector() throws InterruptedException {
+ inMemoryBean.outgoing("OutgoingTestMessage");
+ List extends Message