Mirth Connect
  1. Mirth Connect
  2. MIRTH-2403

Placing a non-serializable object in the connector/channel map causes queuing to break

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 3.0.0 Beta 1, 3.0.0
    • Component/s: Server
    • Labels:
      None

      Description

      If a user places a non-serializable object in the connector or channel map and persistent queuing is off, then the message will process just fine. The database will still be able to store it too (in most cases) because toString() is called rather than attempting to serialize it.

      However, if persistent queuing is on, then the message will always fail with an exception like this:

      ERROR-408: MLLP Connector error
      ERROR MESSAGE: Can't save payload to queue
      java.io.NotSerializableException: <class name here>

        Activity

        Hide
        Nick Rupley added a comment -

        This has been fixed due to MIRTH-2250 and MIRTH-428. The new queuing framework no longer serializes connector messages; the objects themselves are held in memory in the PersistedBlockingQueue (subject to a max buffer size), which calls the Donkey DAO to select/construct connector messages when the queue buffer depletes.

        One side effect of this is that when queuing is on, there is no guarantee that non-serializable objects will be available by the time the destination connector attempts to dispatch (and replaces any connector properties). This is because if a message is offered to a full destination queue, it will simply update the current queue size and not store the object in memory (the object should already have been committed to the database). Once the queue repopulates, the connector messages that were offered but not added will contain the toString() representations of any map objects that were not serializable.

        Show
        Nick Rupley added a comment - This has been fixed due to MIRTH-2250 and MIRTH-428 . The new queuing framework no longer serializes connector messages; the objects themselves are held in memory in the PersistedBlockingQueue (subject to a max buffer size), which calls the Donkey DAO to select/construct connector messages when the queue buffer depletes. One side effect of this is that when queuing is on, there is no guarantee that non-serializable objects will be available by the time the destination connector attempts to dispatch (and replaces any connector properties). This is because if a message is offered to a full destination queue, it will simply update the current queue size and not store the object in memory (the object should already have been committed to the database). Once the queue repopulates, the connector messages that were offered but not added will contain the toString() representations of any map objects that were not serializable.

          People

          • Assignee:
            Nick Rupley
            Reporter:
            Nick Rupley
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development