@@ -45,41 +45,15 @@ import scala.jdk.CollectionConverters._
45
45
object ConnectionResource {
46
46
type ConnectionResource [F [_]] = Connection [Resource [F , * ]]
47
47
48
- @ deprecated(" use other make method with configurable execution context" , " 4.1.1" )
49
- private [algebra] def make [F [_]: Sync : Log ](
50
- conf : Fs2RabbitConfig ,
51
- sslCtx : Option [SSLContext ],
52
- saslConf : SaslConfig ,
53
- metricsCollector : Option [MetricsCollector ],
54
- threadFactory : Option [F [ThreadFactory ]]
55
- ): F [Connection [Resource [F , * ]]] = {
56
- val addThreadFactory : F [ConnectionFactory => Unit ] =
57
- threadFactory.fold(Sync [F ].pure((_ : ConnectionFactory ) => ())) { threadFact =>
58
- threadFact.map { tf => (cf : ConnectionFactory ) =>
59
- cf.setThreadFactory(tf)
60
- }
61
- }
62
- addThreadFactory.flatMap { fn =>
63
- _make(
64
- conf,
65
- None ,
66
- sslCtx,
67
- saslConf,
68
- metricsCollector,
69
- fn
70
- )
71
- }
72
- }
73
-
74
48
def make [F [_]: Sync : Log ](
75
49
conf : Fs2RabbitConfig ,
76
50
executionContext : ExecutionContext ,
77
- sslCtx : Option [SSLContext ] = None ,
51
+ sslCtx : Option [SSLContext ],
78
52
// Unlike SSLContext, SaslConfig is not optional because it is always set
79
53
// by the underlying Java library, even if the user doesn't set it.
80
- saslConf : SaslConfig = DefaultSaslConfig . PLAIN ,
81
- metricsCollector : Option [MetricsCollector ] = None ,
82
- threadFactory : Option [F [ThreadFactory ]] = None
54
+ saslConf : SaslConfig ,
55
+ metricsCollector : Option [MetricsCollector ],
56
+ threadFactory : Option [F [ThreadFactory ]]
83
57
): F [Connection [Resource [F , * ]]] = {
84
58
val addThreadFactory : F [ConnectionFactory => Unit ] =
85
59
threadFactory.fold(Sync [F ].pure((_ : ConnectionFactory ) => ())) { threadFact =>
0 commit comments