[
https://issues.apache.org/jira/browse/CAMEL-15064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161042#comment-17161042
]
Omar Al-Safi commented on CAMEL-15064:
--------------------------------------
Hi [~rvenk], is pretty weird indeed, I have tested here on my end and I get the
following in the logs if I don't pass `GOOGLE_APPLICATION_CREDENTIALS`:
{code}
2020-07-20 10:52:56,365 [ngupInterceptor] INFO DefaultMainShutdownStrategy
- Received hang up - stopping the main instance.
2020-07-20 10:52:56,366 [main ] INFO AbstractCamelContext
- Apache Camel 3.4.1 (camel-1) is shutting down
2020-07-20 10:52:56,365 [nsumer[testSub]] ERROR GooglePubsubConsumer
- Failure getting messages from PubSub
java.lang.IllegalStateException: Expected the service InnerService [FAILED] to
be RUNNING, but the service has FAILED
at
com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:366)
~[guava-28.2-jre.jar:?]
at
com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:302)
~[guava-28.2-jre.jar:?]
at
com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:96)
~[api-common-1.8.1.jar:?]
at
org.apache.camel.component.google.pubsub.GooglePubsubConsumer$SubscriberWrapper.asynchronousPull(GooglePubsubConsumer.java:131)
[camel-google-pubsub-3.4.1.jar:3.4.1]
at
org.apache.camel.component.google.pubsub.GooglePubsubConsumer$SubscriberWrapper.run(GooglePubsubConsumer.java:115)
[camel-google-pubsub-3.4.1.jar:3.4.1]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:1.8.0_222]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_222]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: java.lang.IllegalStateException: java.io.IOException: The
Application Default Credentials are not available. They are available if
running in Google Compute Engine. Otherwise, the environment variable
GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the
credentials. See
https://developers.google.com/accounts/docs/application-default-credentials for
more information.
at com.google.cloud.pubsub.v1.Subscriber.doStart(Subscriber.java:265)
~[google-cloud-pubsub-1.102.0.jar:1.102.0]
at
com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:148)
~[api-common-1.8.1.jar:?]
at
com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:248)
~[guava-28.2-jre.jar:?]
at
com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:120)
~[api-common-1.8.1.jar:?]
at
com.google.cloud.pubsub.v1.Subscriber.startAsync(Subscriber.java:254)
~[google-cloud-pubsub-1.102.0.jar:1.102.0]
... 7 more
{code}
I could think of the logger perhaps. Is it possible if you can attach the logs
from your end to check this out?
> 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)