title: Using Apache Camel/Smallrye/reactive streams - how can I connect a "publisher" to a "subscriber" across JVMs?
body: <p>Below is my attempt at a Apache Camel reactive streams solution to connect a publisher to a subscriber (code for camel routes is shown below) across JVM's </p>
  
  <p>To enable the communication to span JVMs, it seems a "broker" server is required.  Therefore, I've implemented Artemis broker and modified application.properties files accordingly (as per my best understanding of how to do so).</p>
  
  <p>Also, to narrow the focus, have chosen to use the smallrye-ampq connector.</p>
  
  <p><strong>Problem:</strong>  </p>
  
  <p>The subscriber should be receiving and logging the the String value (from the body):</p>
  
  <pre><code>-
  -
  -
  :blahblahblah
  :blahblahblah
  :blahblahblah
  -
  -
  -
  </code></pre>
  
  <p>--Instead, it is logging the values, like this: </p>
  
  <pre><code>-
  -
  -
  :Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-289]
  :Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-292]
  :Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-295]
  -
  -
  -
  </code></pre>
  
  <p><strong><em>Question:</em></strong>  </p>
  
  <p><em>why is the payload send by the publisher not reaching the subscriber and what code/configuration can I modify to fix it?</em>  </p>
  
  <p>thx in advance for any help!</p>
  
  <h2>---</h2>
  
  <p><strong><em>The "Publisher" route</em></strong></p>
  
  <pre><code>package aaa.bbb.ccc.jar;
  
  import javax.enterprise.context.ApplicationScoped;
  import javax.inject.Inject;
  import org.eclipse.microprofile.reactive.messaging.Outgoing;
  import org.reactivestreams.Publisher;
  import org.apache.camel.CamelContext;
  import org.apache.camel.builder.RouteBuilder;
  import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
  import org.apache.camel.component.reactive.streams.api.CamelReactiveStreams;
  import org.apache.camel.Exchange;
  import org.apache.camel.Processor;
  
  @ApplicationScoped
  public class CamelPub extends RouteBuilder {
  
      @Inject
      CamelContext ctx;
  
      CamelReactiveStreamsService crss;
      static int x = 0;
  
      @Outgoing("data")
      public Publisher&lt;Exchange&gt; source() {
          return crss.from("seda:thesource");
      }
  
      @Override
      public void configure() {
  
          crss = CamelReactiveStreams.get(ctx);
          from("timer://thetimer?period=1000")
                  .process(new Processor() {
                      @Override
                      public void process(Exchange msg) throws Exception {
                          msg.getIn().setBody("blahblahblah"); //(Integer.toString(x++));
                      }
                  })
                  .log("....... PUB ....... camelpub - body: ${body}")
                  .to("direct:thesource");
      }
  }
  </code></pre>
  
  <p><strong><em>microprofile-config.properties - publisher</em></strong></p>
  
  <pre><code>injected.value=Injected value
  value=lookup value
  # Microprofile server properties
  server.port=8084
  server.host=0.0.0.0
  
  mp.messaging.outgoing.data.connector=smallrye-amqp
  mp.messaging.outgoing.data.host=localhost
  mp.messaging.outgoing.data.port=5672
  mp.messaging.outgoing.data.username=artuser
  mp.messaging.outgoing.data.password=artpassword
  mp.messaging.outgoing.data.endpoint-uri:seda:thesource
  mp.messaging.outgoing.data.broadcast=true
  mp.messaging.outgoing.data.durable=true
  </code></pre>
  
  <p><strong><em>relevant console log excerpt(?) - publisher</em></strong></p>
  
  <pre><code>...
  --- exec-maven-plugin:1.5.0:exec (default-cli) @ camelpub ---
  2019.12.17 22:26:34 INFO io.helidon.microprofile.server.Main Thread[main,5,main]: Logging configured using classpath: /logging.properties
  2019.12.17 22:26:35 INFO org.jboss.weld.Version Thread[main,5,main]: WELD-000900: 3.1.1 (Final)
  2019.12.17 22:26:35 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-000020: Using jandex for bean discovery
  2019.12.17 22:26:35 WARN org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-001208: Error when validating null@6 against xsd. cvc-complex-type.4: Attribute 'bean-discovery-mode' must appear on element 'beans'.
  2019.12.17 22:26:35 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
  2019.12.17 22:26:36 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes.processAnnotatedType(@Observes ProcessAnnotatedType&lt;?&gt;, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:26:36 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private io.helidon.microprofile.openapi.IndexBuilder.processAnnotatedType(@Observes ProcessAnnotatedType&lt;X&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:26:36 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType&lt;?&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:26:36 WARN org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-001101: Member of array type or annotation type must be annotated @NonBinding:  [EnhancedAnnotatedMethodImpl] public abstract javax.enterprise.inject.Typed.value()
  2019.12.17 22:26:36 INFO org.apache.camel.cdi.CdiCamelExtension Thread[main,5,main]: Camel CDI is starting Camel context [camel-1]
  2019.12.17 22:26:36 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Apache Camel 3.0.0 (CamelContext: camel-1) is starting
  2019.12.17 22:26:36 INFO org.apache.camel.impl.engine.DefaultManagementStrategy Thread[main,5,main]: JMX is disabled
  2019.12.17 22:26:37 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
  2019.12.17 22:26:37 INFO org.apache.camel.component.seda.SedaEndpoint Thread[main,5,main]: Endpoint seda://thesource is using shared queue: seda://thesource with size: 1000
  2019.12.17 22:26:37 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Route: route1 started and consuming from: timer://thetimer?period=1000
  2019.12.17 22:26:37 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Total 1 routes, of which 1 are started
  2019.12.17 22:26:37 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Apache Camel 3.0.0 (CamelContext: camel-1) started in 0.191 seconds
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.ReactiveMessagingExtension Thread[main,5,main]: Analyzing mediator bean: Managed Bean [class aaa.bbb.ccc.jar.CamelPub] with qualifiers [@Any @Default]
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Scanning Type: class aaa.bbb.ccc.jar.CamelPub
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Deployment done... start processing
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Found incoming connectors: []
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Found outgoing connectors: []
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Stream manager initializing...
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Initializing mediators
  2019.12.17 22:26:37 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Route: route2 started and consuming from: seda://thesource
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Connecting mediators
  2019.12.17 22:26:37 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Connecting method aaa.bbb.ccc.jar.CamelPub#source to sink data
  2019.12.17 22:26:37 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-002003: Weld SE container e71e38c0-91ec-4758-a310-55f1368c6a9c initialized
  2019.12.17 22:26:37 WARNING io.helidon.microprofile.server.Server$Builder Thread[main,5,main]: Failed to find JAX-RS resource to use
  2019.12.17 22:26:37 INFO io.helidon.microprofile.security.SecurityMpService Thread[main,5,main]: Security extension for microprofile is enabled, yet security configuration is missing from config (requires providers configuration at key security.providers). Security will not have any valid provider.
  2019.12.17 22:26:37 INFO io.smallrye.openapi.api.OpenApiDocument Thread[main,5,main]: OpenAPI document initialized: io.smallrye.openapi.api.models.OpenAPIImpl@57fbc06f
  2019.12.17 22:26:38 INFO route1 Thread[Camel (camel-1) thread #1 - timer://thetimer,5,main]: ....... PUB ....... camelpub - body: 0
  2019.12.17 22:26:38 INFO io.helidon.webserver.NettyWebServer Thread[main,5,main]: Version: 1.4.0
  2019.12.17 22:26:38 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x52928b67, L:/0:0:0:0:0:0:0:0:8084]
  2019.12.17 22:26:38 INFO io.helidon.microprofile.server.ServerImpl Thread[nioEventLoopGroup-2-1,10,main]: Server initialized on http://localhost:8084 (and all other host addresses) in 3668 milliseconds.
  2019.12.17 22:26:39 INFO route1 Thread[Camel (camel-1) thread #1 - timer://thetimer,5,main]: ....... PUB ....... camelpub - body: 1
  2019.12.17 22:26:40 INFO route1 Thread[Camel (camel-1) thread #1 - timer://thetimer,5,main]: ....... PUB ....... camelpub - body: 2
  2019.12.17 22:26:41 INFO route1 Thread[Camel (camel-1) thread #1 - timer://thetimer,5,main]: ....... PUB ....... camelpub - body: 3
  2019.12.17 22:26:42 INFO route1 Thread[Camel (camel-1) thread #1 - timer://thetimer,5,main]: ....... PUB ....... camelpub - body: 4
  ...
  </code></pre>
  
  <p><strong><em>the "Subscriber" route</em></strong></p>
  
  <pre><code>package aaa.bbb.ccc.jar;
  
  import javax.inject.Inject;
  import org.apache.camel.CamelContext;
  import org.apache.camel.builder.RouteBuilder;
  import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
  import javax.enterprise.context.ApplicationScoped;
  import org.apache.camel.component.reactive.streams.api.CamelReactiveStreams;
  import org.eclipse.microprofile.reactive.messaging.Incoming;
  import org.reactivestreams.Subscriber;
  
  @ApplicationScoped
  public class CamelSub extends RouteBuilder {
  
      public CamelSub() throws Exception {
      }
  
      @Inject
      CamelContext ctx;
  
      CamelReactiveStreamsService crss;
  
      @Incoming("data")
      public Subscriber&lt;String&gt; sink() {
      return crss.subscriber("seda:thesink", String.class);
      }    
  
      @Override
      public void configure() {
  
      crss = CamelReactiveStreams.get(ctx);
  
      from("seda:thesink")
          .convertBodyTo(String.class)
          .log("ooooooo SUB ooooooo camelsub - body: ${body}");
      }
  }
  </code></pre>
  
  <p><strong><em>microprofile-config.properties - subscriber</em></strong></p>
  
  <pre><code>injected.value=Injected value
  value=lookup value
  # Microprofile server properties
  server.port=8082
  server.host=0.0.0.0
  
  mp.messaging.incoming.data.connector=smallrye-amqp
  mp.messaging.incoming.data.host=localhost
  mp.messaging.incoming.data.port=5672
  mp.messaging.incoming.data.username=artuser
  mp.messaging.incoming.data.password=artpassword
  mp.messaging.incoming.data.endpoint-uri:seda:thesink
  mp.messaging.incoming.data.broadcast=true
  mp.messaging.incoming.data.durable=true
  </code></pre>
  
  <p><strong><em>relevant console log excerpt(?) - subscriber</em></strong></p>
  
  <pre><code>...
  --- exec-maven-plugin:1.5.0:exec (default-cli) @ camelsub ---
  2019.12.17 22:28:09 INFO io.helidon.microprofile.server.Main Thread[main,5,main]: Logging configured using classpath: /logging.properties
  2019.12.17 22:28:10 INFO org.jboss.weld.Version Thread[main,5,main]: WELD-000900: 3.1.1 (Final)
  2019.12.17 22:28:10 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-000020: Using jandex for bean discovery
  2019.12.17 22:28:10 WARN org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-001208: Error when validating null@6 against xsd. cvc-complex-type.4: Attribute 'bean-discovery-mode' must appear on element 'beans'.
  2019.12.17 22:28:10 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
  2019.12.17 22:28:10 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes.processAnnotatedType(@Observes ProcessAnnotatedType&lt;?&gt;, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:28:10 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private io.helidon.microprofile.openapi.IndexBuilder.processAnnotatedType(@Observes ProcessAnnotatedType&lt;X&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:28:10 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private org.apache.camel.cdi.CdiCamelExtension.processAnnotatedType(@Observes ProcessAnnotatedType&lt;?&gt;) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
  2019.12.17 22:28:10 WARN org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-001101: Member of array type or annotation type must be annotated @NonBinding:  [EnhancedAnnotatedMethodImpl] public abstract javax.enterprise.inject.Typed.value()
  2019.12.17 22:28:11 INFO org.apache.camel.cdi.CdiCamelExtension Thread[main,5,main]: Camel CDI is starting Camel context [camel-1]
  2019.12.17 22:28:11 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Apache Camel 3.0.0 (CamelContext: camel-1) is starting
  2019.12.17 22:28:11 INFO org.apache.camel.impl.engine.DefaultManagementStrategy Thread[main,5,main]: JMX is disabled
  2019.12.17 22:28:11 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
  2019.12.17 22:28:11 INFO org.apache.camel.component.seda.SedaEndpoint Thread[main,5,main]: Endpoint seda://thesink is using shared queue: seda://thesink with size: 1000
  2019.12.17 22:28:11 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Route: route1 started and consuming from: seda://thesink
  2019.12.17 22:28:11 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Total 1 routes, of which 1 are started
  2019.12.17 22:28:11 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Apache Camel 3.0.0 (CamelContext: camel-1) started in 0.173 seconds
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.extension.ReactiveMessagingExtension Thread[main,5,main]: Analyzing mediator bean: Managed Bean [class aaa.bbb.ccc.jar.CamelSub] with qualifiers [@Any @Default]
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Scanning Type: class aaa.bbb.ccc.jar.CamelSub
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Deployment done... start processing
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Found incoming connectors: []
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Found outgoing connectors: []
  2019.12.17 22:28:11 INFO io.smallrye.reactive.messaging.impl.ConfiguredChannelFactory Thread[main,5,main]: Stream manager initializing...
  2019.12.17 22:28:12 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Initializing mediators
  2019.12.17 22:28:12 INFO org.apache.camel.impl.DefaultCamelContext Thread[main,5,main]: Route: route2 started and consuming from: reactive-streams://ID-LAPTOP-4LR4PMVQ-1576639692145-0-1
  2019.12.17 22:28:12 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Connecting mediators
  2019.12.17 22:28:12 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Attempt to resolve aaa.bbb.ccc.jar.CamelSub#sink
  2019.12.17 22:28:12 INFO io.smallrye.reactive.messaging.extension.MediatorManager Thread[main,5,main]: Connecting aaa.bbb.ccc.jar.CamelSub#sink to `data` (org.eclipse.microprofile.reactive.streams.operators.core.PublisherBuilderImpl@3eda0aeb)
  2019.12.17 22:28:12 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-002003: Weld SE container c1eaa1fb-486c-4b95-b56b-0f1a7b88f741 initialized
  2019.12.17 22:28:12 WARNING io.helidon.microprofile.server.Server$Builder Thread[main,5,main]: Failed to find JAX-RS resource to use
  2019.12.17 22:28:12 INFO io.helidon.microprofile.security.SecurityMpService Thread[main,5,main]: Security extension for microprofile is enabled, yet security configuration is missing from config (requires providers configuration at key security.providers). Security will not have any valid provider.
  2019.12.17 22:28:12 INFO io.smallrye.openapi.api.OpenApiDocument Thread[main,5,main]: OpenAPI document initialized: io.smallrye.openapi.api.models.OpenAPIImpl@77f905e3
  2019.12.17 22:28:12 INFO io.helidon.webserver.NettyWebServer Thread[main,5,main]: Version: 1.4.0
  2019.12.17 22:28:12 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0xd8f72801, L:/0:0:0:0:0:0:0:0:8082]
  2019.12.17 22:28:12 INFO io.helidon.microprofile.server.ServerImpl Thread[nioEventLoopGroup-2-1,10,main]: Server initialized on http://localhost:8082 (and all other host addresses) in 3310 milliseconds.
  2019.12.17 22:28:13 INFO route1 Thread[Camel (camel-1) thread #1 - seda://thesink,5,main]: ooooooo SUB ooooooo camelsub - body: Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-289]
  2019.12.17 22:28:14 INFO route1 Thread[Camel (camel-1) thread #1 - seda://thesink,5,main]: ooooooo SUB ooooooo camelsub - body: Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-292]
  2019.12.17 22:28:15 INFO route1 Thread[Camel (camel-1) thread #1 - seda://thesink,5,main]: ooooooo SUB ooooooo camelsub - body: Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-295]    
  ...
  </code></pre>
  
  <p><em>NOTE:  above output should be showing numbers... rather than, e.g., "Exchange[ID-LAPTOP-4LR4PMVQ-1576639597494-0-289]", etc...  :-(</em></p>
  
  <p><strong><em>essentially same maven pom.xml for each</em></strong>   </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;aaa.bbb.ccc&lt;/groupId&gt;
      &lt;artifactId&gt;[NOTE: essentially same pom.xml for both camelpub or camelsub]&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;properties&gt;
          &lt;helidonVersion&gt;1.4.0&lt;/helidonVersion&gt;
          &lt;package&gt;aaa.bbb.ccc.jar&lt;/package&gt;
          &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
          &lt;mpVersion&gt;3.2&lt;/mpVersion&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
          &lt;libs.classpath.prefix&gt;libs&lt;/libs.classpath.prefix&gt;
          &lt;mainClass&gt;io.helidon.microprofile.server.Main&lt;/mainClass&gt;
          &lt;jersey.version&gt;2.29&lt;/jersey.version&gt;
          &lt;copied.libs.dir&gt;${project.build.directory}/${libs.classpath.prefix}&lt;/copied.libs.dir&gt;
          &lt;camelversion&gt;3.0.0&lt;/camelversion&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.microprofile&lt;/groupId&gt;
              &lt;artifactId&gt;microprofile&lt;/artifactId&gt;
              &lt;version&gt;${mpVersion}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.microprofile.reactive.messaging&lt;/groupId&gt;
              &lt;artifactId&gt;microprofile-reactive-messaging-api&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
              &lt;type&gt;jar&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;8.0&lt;/version&gt;
              &lt;type&gt;jar&lt;/type&gt;
          &lt;/dependency&gt; 
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-core&lt;/artifactId&gt;
              &lt;version&gt;${camelversion}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-reactive-streams&lt;/artifactId&gt;
              &lt;version&gt;${camelversion}&lt;/version&gt;
          &lt;/dependency&gt;       
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
              &lt;artifactId&gt;camel-cdi&lt;/artifactId&gt;
              &lt;version&gt;${camelversion}&lt;/version&gt;
          &lt;/dependency&gt;                              
          &lt;dependency&gt;
              &lt;groupId&gt;io.smallrye.reactive&lt;/groupId&gt;
              &lt;artifactId&gt;smallrye-reactive-messaging-provider&lt;/artifactId&gt;
              &lt;version&gt;1.0.8&lt;/version&gt;
          &lt;/dependency&gt;          
          &lt;dependency&gt;
              &lt;groupId&gt;io.smallrye.reactive&lt;/groupId&gt;
              &lt;artifactId&gt;smallrye-reactive-messaging-amqp&lt;/artifactId&gt;
              &lt;version&gt;1.0.8&lt;/version&gt;
          &lt;/dependency&gt;          
          &lt;dependency&gt;
              &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
              &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
              &lt;version&gt;2.0&lt;/version&gt;
          &lt;/dependency&gt;          
          &lt;dependency&gt;
              &lt;groupId&gt;io.helidon&lt;/groupId&gt;
              &lt;artifactId&gt;helidon-bom&lt;/artifactId&gt;
              &lt;version&gt;${helidonVersion}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss&lt;/groupId&gt;
              &lt;artifactId&gt;jandex&lt;/artifactId&gt;
              &lt;version&gt;2.1.1.Final&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;            
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.activation&lt;/groupId&gt;
              &lt;artifactId&gt;javax.activation-api&lt;/artifactId&gt;
              &lt;version&gt;1.2.0&lt;/version&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;            
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-media-json-binding&lt;/artifactId&gt;
              &lt;version&gt;${jersey.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.helidon.microprofile.bundles&lt;/groupId&gt;
              &lt;artifactId&gt;helidon-microprofile-3.0&lt;/artifactId&gt;
              &lt;version&gt;${helidonVersion}&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;[NOTE: essentially same pom.xml for both camelpub or camelsub]&lt;/finalName&gt;
          &lt;plugins&gt;                             
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.5&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;classpathPrefix&gt;${libs.classpath.prefix}&lt;/classpathPrefix&gt;
                              &lt;mainClass&gt;${mainClass}&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;copy-dependencies&lt;/id&gt;
                          &lt;phase&gt;prepare-package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${copied.libs.dir}&lt;/outputDirectory&gt;
                              &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt;
                              &lt;overWriteSnapshots&gt;false&lt;/overWriteSnapshots&gt;
                              &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt;
                              &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt;
                              &lt;includeScope&gt;runtime&lt;/includeScope&gt;
                              &lt;excludeScope&gt;test&lt;/excludeScope&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong><em>docker-compose.yml (Artemis)</em></strong>  </p>
  
  <pre><code># A docker compose file to start an Artemis AMQP broker
  # more details on https://github.com/vromero/activemq-artemis-docker.
  version: '2'
  
  services:
  
    artemis:
      image: vromero/activemq-artemis:2.8.0-alpine
      ports:
        - "8161:8161"
        - "61616:61616"
        - "5672:5672"
      environment:
        ARTEMIS_USERNAME: artuser
        ARTEMIS_PASSWORD: artpassword
  </code></pre>
  
  <p><strong><em>technologies used</em></strong></p>
  
  <pre><code>java 8
  apache camel
  smallrye
  artemis
  reactive streams/programming
  </code></pre>
  
  <p>(was using this link as a resource:  <a href="https://smallrye.io/smallrye-reactive-messaging/" rel="nofollow noreferrer">https://smallrye.io/smallrye-reactive-messaging/</a>)</p>