You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sowjanya Mudimala <so...@gmail.com> on 2018/09/06 18:47:09 UTC

Fwd: camel-salesforce: Platform event subscription fails pretty frequently

Hi,

I have a simple route to subscribe to Salesforce platform event and
send to AWS-SQS queue. I am using mvn to execute the jar. sometimes
code is working fine and prints the platform event data. but most of
the times as soon as I run the jar, I see the attached
"org.cometd.common.TransportException: null" error. connection doesn't
recover by itself. I have to re-execute the jar. It fails pretty
frequently that I am unable to use the feature. Pls suggest if this is
a valid issue/ something specific to my environment.

Envirnoment:  MAC , Java 10

context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {

from("sfdc:event/Netsuite_Customer_Event__e")
.process(new Processor() {

@Override
public void process(Exchange exchange) throws Exception {

PlatformEvent event = exchange.getIn().getBody(PlatformEvent.class);
System.out.println("****************Received Event : " +
event.getEventData().toString());
// org.cometd.bayeux.Message event =
exchange.getIn().getBody(org.cometd.bayeux.Message.class);
// System.out.println("Received Event: " + event.getJSON());

}

})
.to("aws-sqs:"
+ "FIFOQueue.fifo"
+ "?amazonSQSClient=#sqsClient"
+ "&extendMessageVisibility="
+ true
+ "&messageGroupIdStrategy=useConstant"
+ "&visibilityTimeout="
+ 900
+ "&attributeNames=ApproximateFirstReceiveTimestamp,ApproximateReceiveCount,SentTimestamp");

}
});

Thanks,
Sowjanya