[ 
https://issues.apache.org/jira/browse/CAMEL-15064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161158#comment-17161158
 ] 

Ramesh Venkitaswaran commented on CAMEL-15064:
----------------------------------------------

 
{code:java}
@Grapes([
 @Grab(group='org.apache.camel', module='camel-core', version='3.1.0'),
 @Grab(group='org.apache.camel', module='camel-google-pubsub', version='3.1.0'),
 @Grab(group='org.slf4j', module='slf4j-api', version='1.7.30'),
 @Grab(group='ch.qos.logback', module='logback-classic', version='1.2.3'),
])
import org.apache.camel.CamelContext
import org.apache.camel.impl.DefaultCamelContext
import org.apache.camel.builder.RouteBuilder
import org.apache.camel.Exchange
import org.apache.camel.Message
import org.apache.camel.Processor
main()
def main() {
 println "downloaded camel dependencies"
 CamelContext context = new DefaultCamelContext()
 context.addRoutes(new ReadFromQueueWithPubsub())
 context.start()
 addShutdownHook { context.stop() }
 synchronized(this){ this.wait() }
}

class ReadFromQueueWithPubsub extends RouteBuilder {
@Override
 void configure() {
 
from("google-pubsub://GCP-PROJECT-NAME:transaction-test-subscriber?ackMode=AUTO")
 .to("log:input?showAll=true")
 .log("Done")
}
}

class Work {
 Integer runCommand(String body) {
 println "RUNNING COMMAND with ${body}"
 Process cmd = "/bin/bash 
/Users/ramesh/Code/groovy/emulate-long-running.sh".execute()
 String text = cmd.text
 return cmd.exitValue()
 }
String useHeaders(Exchange ex) {
 Message msg = ex.getIn()
 String body = msg.getBody(String.class)
 def msgAttribs = msg.getHeader("CamelGooglePubsub.Attributes", HashMap.class)
 def ack = msg.getHeader("CamelGooglePubsub.MsgAckId", String.class)
 println "Body = ${body}; Ack = ${ack}"
 return body
 }
}
{code}
 

 

> Messages no more received from Google Pubsub
> --------------------------------------------
>
>                 Key: CAMEL-15064
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15064
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-google-pubsub
>    Affects Versions: 3.2.0
>         Environment: * macOS 10.15.4
>  * OpenJDK 11.0.6 2020-01-14
>  * I've been able to reproduce the issue on Ubuntu 16, same JDK
>            Reporter: Jean-Pierre Matsumoto
>            Assignee: Omar Al-Safi
>            Priority: Major
>             Fix For: 3.4.0
>
>
> With Camel 3.2.0, my route does not receive the messages from Google Pubsub. 
> The exact same route works well if I downgrade to 3.1.0.
> I've created following test case to reproduce easily the issue:
> {code:java}
> @Component
> public class SimplePubsubRouteBuilder extends RouteBuilder {
>   @Override
>   public void configure() throws Exception {
>     from("google-pubsub://project-id:subs-name")
>       .to("log:myLog?showHeaders=true");
>   }
> }{code}
> Result with *Camel 3.2.0*: nothing happens, no errors even with DEBUG log
>  level.
> Result with *Camel 3.1.0*: error 404 as expected since Pubsub subscription
>  path is invalid.
> I've tried to fix the issue myself with no success. But by tracing with 
> debugger, I think the issue is because of bad version of Guava library.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to