chibenwa commented on code in PR #1409:
URL: https://github.com/apache/james-project/pull/1409#discussion_r1088502407
##########
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:
Shouldn't the pulsar client be a global entity rather than a "per queue"
entity?
-> Sounds like expensive resources to maintain
-> the chances of the leaks increases
My opinion is that it would better fit as a backend-pulsar component
injected down the stack.
##########
backends-common/pulsar/src/main/scala/org/apache/james/backends/pulsar/PulsarConfiguration.scala:
##########
@@ -1,42 +1,76 @@
-/****************************************************************
+/** **************************************************************
Review Comment:
Let's avoid changes in the license formatting
--
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]