title: Cannot pass callback lambdas into .toReactivePublisher().subscribe() in Spring Integration with Project Reactor
body: <p>I'm getting an error of <code>Caused by: java.lang.IllegalStateException: No subscriptions have been created</code> when I use Spring Integration with Project Reactor and I try to figure out how can I subscribe. My original code was:</p>
  <pre class="lang-java prettyprint-override"><code>    @Bean
      public IntegrationFlow writeToKafka() {
          return IntegrationFlows.from(reactiveKafkaConsumerTemplate.receiveAutoAck()
                  .map(payload -&gt; {
                      return new GenericMessage&lt;ConsumerRecord&lt;String, String&gt;&gt;(payload);
                  }))
              .&lt;ConsumerRecord&lt;String, String&gt;, String&gt;transform(ConsumerRecord::value)
              .channel(c -&gt; c.queue(&quot;resultChannel&quot;))
              .get();
      }
  
  </code></pre>
  <p>After it threw the error I've tried to subscribe but I've couldn't understand what should I pass to the subscribe method, that seems to act differently than the regular reactive <code>.subscribe()</code>.</p>
  <pre class="lang-java prettyprint-override"><code>    @Bean
      public void writeToKafka() {
          return IntegrationFlows.from(reactiveKafkaConsumerTemplate.receiveAutoAck()
                  .map(payload -&gt; {
                      return new GenericMessage&lt;ConsumerRecord&lt;String, String&gt;&gt;(payload);
                  }))
              .&lt;ConsumerRecord&lt;String, String&gt;, String&gt;transform(ConsumerRecord::value)
              .channel(c -&gt; c.queue(&quot;resultChannel&quot;))
              .toReactivePublisher().subscribe(value -&gt; {
                  log.info(&quot;Wrote: &quot; + value);
              });
      }
  
  </code></pre>