Class SpringAmqpConnectionFactory

java.lang.Object
org.springframework.amqp.client.SingleAmqpConnectionFactory
org.springframework.amqp.client.SpringAmqpConnectionFactory
All Implemented Interfaces:
AmqpConnectionFactory, DisposableBean

public class SpringAmqpConnectionFactory extends SingleAmqpConnectionFactory
The SingleAmqpConnectionFactory extension to recover the session shared by the links of the connection.

All the links opened from a ProtonJ Connection live on its default session. A peer may end that session while the connection stays open, for example, on an authorization error, and ProtonJ does not replace a closed default session. Every link on the session is gone then, and no new link can be opened on this connection.

The Connection returned from this factory opens links on a session it manages itself, and replaces that session when it is found closed on the next attempt to open a link. This class is a workaround and may be removed when ProtonJ recovers the default session itself.

Since:
4.1.3
Author:
Tanishq Choudhary
  • Constructor Details

    • SpringAmqpConnectionFactory

      public SpringAmqpConnectionFactory()
      Create an instance based on a default client.
    • SpringAmqpConnectionFactory

      public SpringAmqpConnectionFactory(org.apache.qpid.protonj2.client.Client protonClient)
      Create an instance based on the provided Client.
      Parameters:
      protonClient - the client to use.
  • Method Details