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

[Bug]: Messages are not published when a connection is closed with JmsIO #24971

Closed
1 task done
Amraneze opened this issue Jan 11, 2023 · 2 comments · Fixed by #24973
Closed
1 task done

[Bug]: Messages are not published when a connection is closed with JmsIO #24971

Amraneze opened this issue Jan 11, 2023 · 2 comments · Fixed by #24973

Comments

@Amraneze
Copy link
Contributor

Amraneze commented Jan 11, 2023

What happened?

When using JmsIO for publishing messages, we found out that messages are not being published when the connection is closed due to any reason (Network, Broker down ...). Even though we have the option to get failed published messages we don't have a way to have a retry policy.

 var failedPublishedMessages = messages.apply(getWriter(sinkOptions)).getFailedMessages();
 failedPublishedMessages.apply(REPUBLISH_FAILED_MESSAGE_NAME, getWriter(sinkOptions));
 return PDone.in(cdpMessages.getPipeline());

Note: the function getWriter returns JMS writer JmsIO.Write<Message>

Issue Priority

Priority: 1 (data loss / total loss of function)

Issue Components

  • Component: IO connector
@kennknowles
Copy link
Member

Does it cause a failure of the processing of the element? In that case the runner should retry the processing with a fresh instance of the DoFn, which should retry the publish. It isn't as good as a retry policy, but it avoids data loss.

@Amraneze
Copy link
Contributor Author

Correct me if I'm wrong, but in a bundle, when a message is failed the whole bundle will be retried which is not what we want too also, the exception was catched in processElement which makes the DoFn to keep the same instance of the publisher with a failed connection.

@github-actions github-actions bot added this to the 2.46.0 Release milestone Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants