Claus Ibsen created CAMEL-27663:
-----------------------------------

             Summary: camel-azure-iothub - the device client pool reuses a 
client for a connection string with another key
                 Key: CAMEL-27663
                 URL: https://issues.apache.org/jira/browse/CAMEL-27663
             Project: Camel
          Issue Type: Bug
          Components: camel-azure
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The device client pool of camel-azure-iothub keys its pooled clients by the 
HostName, DeviceId and ModuleId of the connection string only. The key of the 
connection string (SharedAccessKey or SharedAccessSignature) is not part of the 
pool key.

So while a client for a device is pooled, a connection string with the same 
HostName and DeviceId but another key reuses that client instead of opening its 
own one. For example, after the key of an endpoint is changed, the component 
keeps using the client opened with the old key while it stays pooled.

The client pool key must include the credential, so clients for different keys 
are not shared: add a SHA-256 hash of the whole connection string to the pool 
key (never the key itself), so each connection string gets its own client.

The component is new in 4.24.0 (CAMEL-22624), so no released version is 
affected.

_Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to