[
https://issues.apache.org/jira/browse/CAMEL-12780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606246#comment-16606246
]
ASF GitHub Bot commented on CAMEL-12780:
----------------------------------------
dhirajsb closed pull request #2508: Salesforce consumer should use
AyncCallback, fixes CAMEL-12780
URL: https://github.com/apache/camel/pull/2508
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
index 8224d644c33..501c6d9d0a7 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceConsumer.java
@@ -22,6 +22,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.component.salesforce.api.SalesforceException;
@@ -144,7 +145,16 @@ public void processMessage(final ClientSessionChannel
channel, final Message mes
}
try {
- getAsyncProcessor().process(exchange);
+ getAsyncProcessor().process(exchange, new AsyncCallback() {
+ @Override
+ public void done(boolean doneSync) {
+ // noop
+ if (log.isTraceEnabled()) {
+ log.trace("Done processing event: {} {}",
channel.getId(),
+ doneSync ? "synchronously" : "asynchronously");
+ }
+ }
+ });
} catch (final Exception e) {
final String msg = String.format("Error processing %s: %s",
exchange, e);
handleException(msg, new SalesforceException(msg, e));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Regression in Camel Salesforce - consumer blocks producer in same route
> -----------------------------------------------------------------------
>
> Key: CAMEL-12780
> URL: https://issues.apache.org/jira/browse/CAMEL-12780
> Project: Camel
> Issue Type: Bug
> Components: camel-salesforce
> Affects Versions: 2.23.0
> Reporter: Dhiraj Bokde
> Assignee: Dhiraj Bokde
> Priority: Blocker
> Labels: salesforce
> Fix For: 2.23.0
>
>
> Salesforce consumer should use a non-blocking AsyncCallback when processing
> exchanges.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)