jeantil commented on code in PR #1409:
URL: https://github.com/apache/james-project/pull/1409#discussion_r1088896140


##########
server/queue/queue-pulsar/src/main/scala/org/apache/james/queue/pulsar/PulsarMailQueue.scala:
##########
@@ -110,11 +108,8 @@ class PulsarMailQueue(
   private implicit val implicitSystem: ActorSystem = system
   private implicit val ec: ExecutionContextExecutor = system.dispatcher
   private implicit val implicitBlobIdFactory: BlobId.Factory = blobIdFactory
-  private implicit val client: PulsarAsyncClient = 
PulsarClient(config.pulsar.brokerUri)
-  private val admin = {
-    val builder = PulsarAdmin.builder()
-    builder.serviceHttpUrl(config.pulsar.adminUri).build()
-  }
+  private implicit val client: PulsarAsyncClient = config.pulsar.asyncClient()
+  private val admin = config.pulsar.adminClient()
 

Review Comment:
    We will have to check all the implications but this sounds reasonable to 
me. Would you accept a `lazy val` on `pulsarConfiguration` to replace the `def` 
for `asyncClient` and `adminClient` respectivey ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to