birschick-bq commented on PR #3218:
URL: https://github.com/apache/arrow-adbc/pull/3218#issuecomment-3137449634

   > So the idea is to be able to do something like this? `ShouldListenTo = 
(activitySource) => activitySource.Tags["Hosturl"] = "abc.databricks.com"` If 
there are mulitple instances of DatabricksConnection with the same combination 
of tags, wouldn't all the listeners pick up on all the activities?
   
   @jeremytang-db 
   
   One option is to start a new Listeners for each connection - in which case, 
you would just use a new Guid for each connection/listener combo.
   
   Or, more complicated is that you hash the connection/token to produce a 
unique reproduceable value that represents the Id and only start a new Listener 
when that Id doesn't already exist. But this will be more complicated in the 
Dispose() code to ensure the last source won't send any more messages.
   
   ```csharp
   this.SourceId = CalculateSourceId(properties);
   ...
   ShouldListenTo = (activitySource) => 
       activitySource.Tags.Any(t => t.Key == "DatabricksSourceId" && 
t.Value?.Equals(this.SourceId) == true)
   ```


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to