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.
Note : See #2144 for auth workaround that is required, and independent of this issue.
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.