title: How to redirect a RTMP stream to clients
body: <p>I have a RTMP stream being broadcasted in the same server as my Spring Boot application.</p>
  
  <p>For instance, it can be accessed using</p>
  
  <blockquote>
    <p>rtmp://localhost/livestream</p>
  </blockquote>
  
  <p>And it's a video livestream, broadcasted from a RED5 server. I want to redirect this livestream to any amount of clients that try to request it.</p>
  
  <p>For example:</p>
  
  <pre><code>@Service
  public class RTMPStreamHandler {
  
  @RequestMapping("/stream") {
  public /*Stream Object?*/ getStream() {
     //What should be returned?
     }
  }
  </code></pre>
  
  <p>This kind of behaviour is necessary so that I can control when that RTMP stream can be accessed, as it will be live 24hrs, but only accessible in some of them. I'll put that logic on my <code>Controller</code>.</p>
  
  <p>How can I setup SpringFramework to read from that RTMP stream and broadcast it to users that try to access that endpoint? Is that a possibility in Spring?</p>