Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4311

Camel Bindy Parser One to Many KvP Unmarshall Issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.0, 2.7.2, 2.7.3, 2.8.0
    • 2.8.1, 2.9.0
    • camel-bindy
    • None
    • Windows, Linux

    • Moderate

    Description

      Bindy KvP unmarshall issue.

      While unmarshalling FIX messages, camel-bindy causing inconsistencies if the incoming fix messages are defined to map using 'OneToMany' annotations.

      In a given route for eg:

      BindyKeyValuePairDataFormat kvpBindyDataFormat = new BindyKeyValuePairDataFormat("org.apache.camel.dataformat.bindy.model.fix.complex.onetomany");
      public void configure()

      { from(URI_DIRECT_START).unmarshal(kvpBindyDataFormat).to(URI_MOCK_RESULT); }

      kvpBindyDataFormat is single instance for multiple threads and with in 'BindyKeyValuePairFactory' class instance varialbe below is shared across multiple threads causing data inconsistencies.

      private Map<String, List<Object>> lists = new HashMap<String, List<Object>>();

      Values from previous thread/messages are retained in the current thread causing issues.

      For eg in the test case: public class BindyComplexOneToManyKeyValuePairUnMarshallTest extends CommonBindyTest

      if we send another message with no repeating groups are sent.

      String message2 = "8=FIX 4.19=2034=135=049=INVMGR56=BRKR" + "1=BE.CHM.00111=CHM0001-0158=this is a camel - bindy test"
      + "10=220";

      The output message has repeating group data from message processed in earlier thread are pouplated causing data inconsistencies.

      Please suggest the fix considering multi-threading scenario. I am willing to volunteer for the fix.

      Regards,
      Surya

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            surya108 surya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: