All our calls to do a publish are hanging.
Our servers are running on flex (non-compat) running pubsub 0.9.4-alpha jars.
Attached are logs...Just before doing the publishing..we log out "Publishing..." and just after log "Published".
The logs only have Publishing...they never make it to Published.
The snippets of the pubsub code is:
public class PubSubNugget extends FinalTouchNugget {
@Override
public void work() {
try {
PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData("payload".getBytes).build();
logger.warning("Publishing!!");
Publisher publisher = publisher();
publisher.publish(pubsubMessage).get();
publisher.shutdown();
logger.warning("Published");
} catch (Exception e) {
logger.warning(ExceptionUtils.getFullStackTrace(e));
}
}
private static TopicName initTopicName() {
return TopicName.create(YConfiguration.get().applicationId(), YConfiguration.get().pubsubTopic());
}
private static Publisher publisher() {
try {
return Publisher.newBuilder(topicName).build();
} catch (IOException e) {
logger.warning(ExceptionUtils.getFullStackTrace(e));
return null;
}
}
private static TopicName topicName = initTopicName();
private static final Logger logger = Logger.getLogger(PubSubNugget.class.getName());
}