Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Elena Felder
    I am quite curious how this ever worked?
    has the environment maybe had datastore emulator installed before...
    Mike Eltsufin
    the CI probably had some GCP env variables set before
    Spencer Gibb
    thanks, it's our internal jenkins. it is where we do releases. that or fixed things
    Elena Felder
    Nickolas Heckman
    Getting started with Spring Cloud Dataflow, and trying to use GCP Pub/Sub for the messaging broker. The documentation I have found mentions this is possible, but is light on details. Is there another source I should consult for more detail?
    Elena Felder
    Dataflow uses Spring Cloud Stream, so if you bring in our Spring Cloud Stream binder (spring-cloud-gcp-pubsub-stream-binder), it should work out of the box.
    (topics/subscriptions are autocreated by default; see Spring Cloud GCP Spring Cloud Stream docs for custom configuration)
    Nickolas Heckman
    Oh, great. That seemed way too easy to be true... No need to include anything special in the skipper or server configuration? (Other than pass google creds to the applications being deployed)
    Elena Felder
    In principle, no, but if you run into issues, file them against our new repo -- https://github.com/googlecloudplatform/spring-cloud-gcp
    Elena Felder
    @spencergibb Could you update the Spring Cloud GCP docs to the 2.0.4 release?
    5 replies
    Philip Bannon

    Hi All,

    I'm trying to use GCP Pub sub with spring boot and I want to publish a simple JSON message to a NodeJS API. I found this sample here: https://github.com/spring-cloud/spring-cloud-gcp/tree/main/spring-cloud-gcp-samples/spring-cloud-gcp-integration-pubsub-json-sample but when I try to add

        public JacksonPubSubMessageConverter jacksonPubSubMessageConverter(ObjectMapper objectMapper) {
            return new JacksonPubSubMessageConverter(objectMapper);

    to my project and the dependancy

        implementation group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-logging'
        implementation group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-logging', version: '1.2.8.RELEASE'
        implementation platform('com.google.cloud:libraries-bom:22.0.0')
        implementation 'com.google.cloud:google-cloud-pubsub:1.114.2'
        implementation group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-pubsub'
        implementation group: 'org.springframework.cloud', name: 'spring-cloud-gcp', version: '1.2.8.RELEASE', ext: 'pom'

    I get the following error: Cannot resolve symbol 'JacksonPubSubMessageConverter'

    Can someone point me in the right direction? Do I need to use Spring integration?

    2 replies

    Hello everyone, sorry for coming in with a super specific question, but I keep hitting the wall with that one:
    I want to subscribe to a pubsub topic via a ReactiveFactory like that: private val flux = reactiveFactory.poll(subscriptionName, 1000).
    Reading and acknowledging a message is done as follows:

    val consumer = flux.flatMap { pubsubMessage -> doSomeStuff(pubSubMessage) }
                .doOnError { log.error("Error consuming message!") }

    Two things are now coming up for me:
    1.) I want to .nack() the pubSubMessage if there's an error - unfortunately any kind of doOnError, onErrorContinue etc. has no info about that it's a pubSubMessage that one can nack().
    2.) I would love to work my way in with tests, but I see no way in how I can check if I correctly negatively acknowledge a message.

    I would be incredibly happy if there's someone who could point me to a resource/code fragment/whatever about that - I feel like I read about everything but can't seem to find an answer for that.
    Thanks in advance!

    4 replies
    Hi, I want to use secret manager to get database password, but it seems it is not working. My bootstrap.properties contains
    18 replies
    Hello, don't know why none of the google cloud features are working - Eg. accessing/reading file from Cloud storage
    java.io.FileNotFoundException: Could not open ServletContext resource [/gs://bucketimages/hello.txt] similar to
    28 replies
    Can someone help please

    Hi, I want to store images in cloud storage and access in my spring boot app on appengine.
    says only about 1 file - my-file.txt

        private Resource gcsFile;

    There is some configuration that says - serve statis content
    ```# You can also serve static resources by reading them from a bucket.

    spring.web.resources.static-locations=gs://* ```

    8 replies
    Eric Turley
    Hey everybody :)
    Can you point me to docs or an example for Spring Cloud GCP BigQuery via Reactive API?
    1 reply
    Nickolas Heckman
    I'm using com.google.cloud:spring-cloud-gcp-pubsub-stream-binder:2.0.4 and having trouble getting publisher errors. It looks like PubSubMessageHandler exposes a method to setFailureCallback but none seem to get registered, nor can I see how to register my own. I'm missing something really obvious right?
    7 replies
    Hey all!
    Anyone here has any experience integrating GCP Profiler for Java apps to an application using bazel? Is thereany documentation around that you might point me to? I couldn't find much.
    2 replies
    I am using the latest version 1.2.8.release of spring-cloud-gcp-starter-pubsub and our prisma container scan is revealing this vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2021-37136 stemming off of grpc-netty-shaded-1.34.1.jar. We have upgraded this jar to get past the vulnerability but doing so resulted in breaking spring-cloud-gcp-starter-pubsub. Is this on your radar to get upgraded or does anyone have a suggestion on upgrading?
    2 replies
    Nickolas Heckman

    Running a set of spring cloud stream applications. Seeing some exceptions when publishing messages to PubSub as part of a data processing stream.

    com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: The request contains an attribute key that is not valid (key=googclient_deliveryattempt). Attribute keys must be non-empty and must not begin with 'goog' (case-insensitive).

    I'm not explicitly assigning this attribute, so I can only imagine it's getting assigned to the output message via inheritance from the input message?

    20 replies
    William S Johnstone III
    Hey all, I have a SpringBoot app using cloud GCP to connect to PubSub. Everything is impl in Reactor, life is good. I see that GCP is using an async pull with a poller. I see in Google's docs that they use a different model, they use streaming (https://cloud.google.com/pubsub/docs/pull#java_4). I'm wondering (if anyone knows) why does GCP poll and not stream? The reason I am asking is that I am adding pubsub pull subscriptions to another non-spring project, and i'm using streaming as per Google's doc. I have noticed a large increase in CPU.
    9 replies
    Aakash Giri
    Hi, I am new to GCP firestore. I created the spring boot application to communicate with firestore using FirestoreReactiveRepository. I want to use @ServerTimestamp annotation in my POJO class so it can populate the lastModified property with server time automatically because of the annotation I am using. But @ServerTimestamp annotation not working as expected and I am getting null value in firestore document. I don't know what I am doing wrong.
    @Document(collectionName = "users")
            public class User {
                     private String documentId;
                     private Date lastModified;
                     public User() {
                    public String getDocumentId() {
                return documentId;
                public void setDocumentId(String documentId) {
                this.documentId = documentId;
                 public Date getLastModified() {
                 return lastModified;
                   public void setLastModified(Date lastModified) {
                this.lastModified = lastModified;
    5 replies

    Hi. I have a Spring Boot application deployed on Google Clod Platform and want to use Google Trace service for tracing. I use the following libraries:

    - org.springframework.cloud:spring-cloud-starter-sleuth
    - com.google.cloud:spring-cloud-gcp-starter-trace
    - com.google.cloud:spring-cloud-gcp-starter-logging

    and in configuration I have:


    Although I have sampler probability = 1.0 and don't see all request sampled on GCP Trace List page. Could someone explain me what is the Google Trace logic, in which conditions GCP will do sampling? Can I somehow in configuration force sampling?

    Thank you.

    14 replies
    Hugo Barrigas

    hello, what's the best way to parse tracing data from the http request body? For reactor and servlet based servers.

    Use case: we're leveraging pubsub push subscriptions which don't add any request headers, pubsub template already puts tracing data as message attributes.

    17 replies