Hello Dojo,
Currently, for the Generic Kafka Consumer, it is necessary to use the Confluent Kafka Nuget DLL's. We added the DLL's to the repo and they get added to the DLLImport directory when installing from the catalog, but the logs continue reporting that it is looking for the DLL's in the Dataminer/Files directory. Now that we are able to use Nugets, we switched over to using the actual Nuget package and the same issue arises, we manually copy over the DLL folders to the appropriate directory but it still points to the Files to read the DLL.
So is there a way to circumvent this and have the driver always look at the DLLImport directory?
We also can not manually copy the DLL's to the Files directory since two of the DLL's, msvcr120 and zlib, are always copied over when upgrading the DMA, which means we have to go back in and reupload them.
Hi Gabriel,
The Confluent Kafka API exposes a Load method: Loads the native librdkafka library from the specified path (note: the specified path needs to include the filename). Does nothing if the library is already loaded.
This call is used in the Generic Kafka Producer specifying a path from the protocolScripts folder.
Gabriel,
I would suggest to take a look at the following tag in your QActions:
dllImport attribute | DataMiner Docs
Also a small remark you say the DMA copies over msvcr120 and zlib this is because the core processes require those. If you go and manually change those you will get untested behavior and potentially corrupt core process behavior.
From what I found about the PE image, could it be you are trying to load unmanaged dll’s into the QActions? Saw some posts about nugget where the unmanaged dll’s where in the wrong folder. Something about the dll’s location. Unmanaged dll’s need to be in the native folder instead of the lib folder.
About the dll’s used by the core, if they are the same files I don’t see a problem then? Why would you need to copy them over again?
From the little research I did on the error it seems like they are a native assembly for .NET, so for those DLL’s we would always need to manually copy them over? And I was mistaken, it’s 3 DLL’s that are replaced, 2 of them are exactly the same, but zlib.dll is smaller on the DM installation and seems to be the one that when replaced loads everything else properly. So could I be replacing it with an updated version and need to test to verify stability?
You should place the one that your QAction needs in another folder and load that one I believe that way your QAction will load the one needed and the core doesn’t needs to be revalidated.
So that was my hopeful thought, since the rest I could copy over or leave alone, but it throws the same PE image error, even when creating a subfolder in the Files directory. Is there another method to do what you’re recommending?
Thank you Davy, I looked over the documentation and when I manually add the necessary DLL’s in the dllImport tag I get the error “PE image doesn’t contain managed metadata” when it tries to load them. And what would the solution for the DLL’s that Dataminer needs be? They also seem like they are the same DLL’s, since they have the same size and modified date.