NHapiTools
NHapiTools copied to clipboard
nHapi returns error for valid HL7 files while doing validation concurrently
We are using nHapitool to validate batch of 1000 HL7 files (want to use it for much more files). We are using Parallel.ForEachAsync loop with degree of parallelism set to 250. For some of the valid HL7 files we receive errors as below:
- An item with the same key has already been added. Key: ^~&
- Index was outside the bounds of the array.Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array
- Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. Please suggest on this, we are kind of blocked on this.
We are using nhapitool version 2.0.3 and .net 6.0
Thanks
Hi,
I'm not the maintainer of NHapi. I can try to help, but I would need more information. For example errors with stack traces and a code example.
Without such details I would be unable to tell you anything useful I'm afraid...
FYI this was also referenced here:
https://github.com/nHapiNET/nHapi/issues/393