-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-pubsub API.
Description
We are seeing a high volume of DNS lookup failures to _grpc_config.pubsub.googleapis.com.
and _grpclb._tcp.pubsub.googleapis.com.
when using the pubsub library.
Environment details
- PubSub
- Linux, container-os (Google Kubernetes Engine)
- Java version: 17
com.google.cloud:google-cloud-pubsub
library version: 1.138.0
Steps to reproduce
- Instantiate PubSub client
- It makes failing NXDOMAIN DNS lookups to
_grpc_config.pubsub.googleapis.com.
and_grpclb._tcp.pubsub.googleapis.com.
Code example
String projectId = "your-project-id-here"; // I used a test project
String topicId = "your-topic-id-here"; // I used a test topic
TopicName topicName = TopicName.of(projectId, topicId);
Publisher publisher = Publisher.newBuilder(topicName).build();
String message = "Hello World!";
PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8(message)).build();
publisher.publish(pubsubMessage);
Run this by setting Log Level to FINEST:
# logging.properties
.level = FINEST
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
io.grpc.level=FINEST
com.google.cloud.pubsub.level = FINEST
# Run the example by setting this system variable
-Djava.util.logging.config.file=.../logging.properties
We can see in the output:
[2025-04-30 12:01:03] [FINER ] About to query SRV records for _grpclb._tcp.pubsub.googleapis.com
[2025-04-30 12:01:04] [FINE ] SRV lookup failure
[2025-04-30 12:01:04] [FINER ] About to query TXT records for _grpc_config.pubsub.googleapis.com
[2025-04-30 12:01:04] [FINE ] ServiceConfig resolution failure
[2025-04-30 12:01:04] [FINE ] No TXT records found for pubsub.googleapis.com
This repeats tons of times through the course of the application's lifecycle. We see 22000 DNS failures a day on average.
What is expected
- The official google libraries are configured out of the box correctly
- or there is a way to turn off this behavior and not create DNS error noise
External references such as API reference guides
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.Issues related to the googleapis/java-pubsub API.