[ 
https://issues.apache.org/jira/browse/CAMEL-16094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17275962#comment-17275962
 ] 

Philipp Lang edited comment on CAMEL-16094 at 1/31/21, 7:35 PM:
----------------------------------------------------------------

I am not sure if a connection pool is the right pattern for my use case. What i 
want is a cache for connections. Because eclipse-milo (respectively OPC-UA) 
supports [subscription 
|https://github.com/eclipse/milo/blob/master/milo-examples/client-examples/src/main/java/org/eclipse/milo/examples/client/SubscriptionExample.java]
 on a OPC-UA Node value. So for my use case i have multiple subscriptions 
(round about 100) which can use the same connection. The follow code shows the 
routes in my application:

 
{code:java}
from("milo-client:opc.tcp://localhost:4344?node=RAW(nsu=urn:foo:bar;s=item-1)"
// ...
from("milo-client:opc.tcp://localhost:4344?node=RAW(nsu=urn:foo:bar;s=item-2)"
// ..
from("milo-client:opc.tcp://localhost:4345?node=RAW(nsu=urn:foo:bar;s=item-3)"{code}
In the example above i would have two connections. One connection per server.

So my suggestion would be to define a new SPI.


was (Author: pla):
I am not sure if a connection pool is the right pattern for my use case. What i 
want is a cache for connections. Because eclipse-milo (respectively OPC-UA) 
supports [subscription 
|https://github.com/eclipse/milo/blob/master/milo-examples/client-examples/src/main/java/org/eclipse/milo/examples/client/SubscriptionExample.java]
 on a OPC-UA Node value. So for my use case i have multiple subscriptions 
(round about 100) which can use the same connection. The follow code shows the 
routes in my application:

 
{code:java}
from("milo-client:opc.tcp://localhost:4344?node=RAW(nsu=urn:foo:bar;s=item-1)"
// ...
from("milo-client:opc.tcp://localhost:4344?node=RAW(nsu=urn:foo:bar;s=item-2)"
// ..
from("milo-client:opc.tcp://localhost:4345?node=RAW(nsu=urn:foo:bar;s=item-3)"{code}
In the example above i would have two connections. One connection per server.

 

> camel-milo - Add ConnectionFactory SPI
> --------------------------------------
>
>                 Key: CAMEL-16094
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16094
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-milo
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 3.x
>
>
> Add an SPI interface to plugin a connection factory, so users can choose 
> different implementations. 
> This is what other component would do like messaging components.
> Then end users can build pooling or shared connection factories or whatnot.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to