Skip to content

Pub/Sub Publisher hangs unless submitted through an executor. #2150

@jabubake

Description

@jabubake

Note : See #2144 for auth workaround that is required, and independent of this issue.

  Publisher publisher = Publisher.defaultBuilder(topicName).build();
    PubsubMessage pubsubMessage =
        PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8(message)).build();
    String messageId = publisher.publish(pubsubMessage).get();

hangs if run directly from a request.

This works only if executed using an ExecutorService. Users should n't be required to provide an executor to publish messages within a request.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.running on app enginetype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions