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

Channel destinations are not always executing in order for synchronized channels #900

Closed
rbeckman-nextgen opened this issue May 11, 2020 · 3 comments
Milestone

Comments

@rbeckman-nextgen
Copy link
Collaborator

Channel A contains a channel writer, which writes to channel B. Both Channel A and Channel B are syncrhonized. Both channels have two or more destinations. Channel B has a soap sender destination and a javascript destination. Expected result is destinations in both channels should run in order.

What I found is that if Channel A sends a message to Channel B the destinations in Channel B are only guaranteed to execute in order if Channel A's Channel Writer destination is set to Wait for Channel Response. If Channel A's Channel Writer destination is not set to Wait for Channel Response then even if Channel B is synchronized it's destinations are not guaranteed to execute in order.

I think this is a bug, a channels destinations should execute in order if the channel is set to synchronized, regardless if the sending channel is waiting for a response.

Imported Issue. Original Details:
Jira Issue Key: MIRTH-895
Reporter: jerchap
Created: 2008-08-06T11:56:27.000-0700

@rbeckman-nextgen rbeckman-nextgen added this to the 1.8.0 milestone May 11, 2020
@rbeckman-nextgen
Copy link
Collaborator Author

Check if this has been resolved in 1.8.

Imported Comment. Original Details:
Author: jacobb
Created: 2008-10-09T12:39:53.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

This doesn't seem to be fixed. Below are the results of my tests:

Channel A:

  • Source: Channel Reader
  • Desintation 1: Channel Writer (Channel B)
  • Desintation 2: JavaScript Writer (log message)

Channel B:

  • Source: Channel Reader
  • Desintation 1: JavaScript Writer (log message)
  • Desintation 2: JavaScript Writer (log message)

Test # 1:

  • "Synchronize channel" ENABLED for both Channel A and B.
  • "Wait for Channel Response" set to YES for Desination 1.
    Input:
  • Sent HL7 message to Channel A.
    Output (oldest to newest):
    CHANNEL B: DESTINATION 1
    CHANNEL B: DESTINATION 2
    CHANNEL A: DESTINATION 2

Test # 2:

Order of destination execution seems random when "Wait for Channel Response" is set to NO.

Imported Comment. Original Details:
Author: geraldb
Created: 2008-10-15T11:14:51.000-0700

@rbeckman-nextgen
Copy link
Collaborator Author

Set the synchronous property on messages to the receiver channel's synchronous property rather than the sender's.

For VMRouter.routeMessage() when useQueue = false and synchronized = true the router has the same behavior as wait for response. Any other combination does not wait for response. Recommended usage is only using routeMessage(String channelName, String message, boolean useQueue), with useQueue assuming the same behavior as !waitForResponse.

Imported Comment. Original Details:
Author: jacobb
Created: 2008-11-10T15:19:13.000-0800

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