title: RSocket-JS + RSocketResumableTransport not working
body: <p>RSocketResumableTransport does not seems to be working. I have below code where i am using RSocketResumableTransport but it never connects to the server(spring-boot version 2.4.0-M1). I am using rsocket-websocket-client&quot;: &quot;0.0.19&quot; version. Below is the class used for connection:</p>
  <pre><code>import { Injectable } from '@angular/core';
  import { IdentitySerializer, JsonSerializer, RSocket, RSocketClient, RSocketResumableTransport } from 'rsocket-core';
  import RSocketWebSocketClient from 'rsocket-websocket-client';
  
  @Injectable({ providedIn: 'root' })
  export class RSocketResumableConnector {
      private client: RSocketClient;
      private rsocket: RSocket;
  
      constructor() {
          console.log('RSocketResumableConnector loaded...');
          this.createConnection();
      }
  
      public createConnection() {
          const resumeToken = Buffer.from('tweet.all');
          const bufferSize = 128;
          const sessionDurationSeconds = 20;
  
          const resumableTransport = new RSocketResumableTransport(
              () =&gt;
                  new RSocketWebSocketClient({
                      url: 'ws://localhost:7000/tweetsocket',
                  }),
              {
                  bufferSize, // max number of sent &amp; pending frames to buffer before failing
                  resumeToken, // unique identifier the session across connections
                  sessionDurationSeconds,
              }
          );
  
          // Create an instance of a client
          this.client = new RSocketClient({
              // send/receive objects instead of strings/buffers
              serializers: {
                  data: JsonSerializer,
                  metadata: IdentitySerializer,
              },
              setup: {
                  payload: {
                      data: 'angular-client',
                      metadata: String.fromCharCode('shell-client'.length) + 'shell-client',
                  },
                  dataMimeType: 'application/json',
                  metadataMimeType: 'message/x.rsocket.routing.v0',
                  keepAlive: 5000,
                  lifetime: 60000,
              },
              transport: resumableTransport,
          });
  
          // start resumableTransport
          let start = true;
          resumableTransport.connectionStatus().subscribe({
              onNext: (status) =&gt; {
                  console.log('Resumable transport status changed: ' + status.kind);
  
                  if (status.kind === 'NOT_CONNECTED') {
                      if (!start) {
                          console.log('Resumable transport disconnected, retrying...');
                          setTimeout(() =&gt; resumableTransport.connect());
                      } else {
                          start = false;
                      }
                  }
              },
              onSubscribe: (resumeSubscription) =&gt; {
                  resumeSubscription.request(Number.MAX_SAFE_INTEGER);
              },
          });
  
          setTimeout(() =&gt; {}, 30000000);
  
          // now create a socket
          this.client.connect().subscribe({
              onComplete: (socket: RSocket) =&gt; {
                  console.log('socket in created', socket);
                  this.rsocket = socket;
              },
              onError: (error) =&gt; console.error('Connection has been refused due to', error),
              onSubscribe: (cancel) =&gt; {
                  console.log('client subscription done..');
              },
              onNext: (data) =&gt; {
                  console.log('data is', data);
              },
          });
      }
  
      public disconnectClient() {
          if (this.client !== undefined) {
              this.client.close();
          }
      }
  
      public getRSocket(): RSocket {
          return this.rsocket;
      }
  }
  </code></pre>
  <p>The continuous error in the browser console is below. This error keeps on repeating till timeout:</p>
  <pre><code>Resumable transport disconnected, retrying...
  Resumable transport status changed: CONNECTING
  Resumable transport status changed: NOT_CONNECTED
  Resumable transport disconnected, retrying...
  </code></pre>
  <p>Please let me know if i m doing something wrong ?</p>