Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rbeckman-nextgen opened this issue May 11, 2020 · 1 comment
Milestone

Comments

@rbeckman-nextgen
Copy link
Collaborator

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:

Imported Issue. Original Details:
Jira Issue Key: MIRTH-2403
Reporter: narupley
Created: 2013-03-18T08:57:06.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

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.

Imported Comment. Original Details:
Author: narupley
Created: 2013-03-18T08:57:17.000-0700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant