You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2023/01/27 01:30:54 UTC
[GitHub] [james-project] chibenwa commented on a diff in pull request #1409: Adds minimal pulsar authentication support to pulsar configuration
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: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org