I am trying to configure google pubsub to push messages to a servlet running on google app engine.
I am able to publish to the topic. I know that this is working because and I am able to retrieve via pull subscriptions using gcloud:
gcloud alpha pubsub subscriptions pull projects/my-project/subscriptions/my-subscription
I am also able to invoke the servlet on app engine from my web browser. But for some reason, I cannot seem to persuade pubsub to invoke the servlet when it is supposed to.
I believe that I have configured the servlet correctly.
Here is the relevant portion of my web.xml file:
<servlet>
<servlet-name>dataExtracted</servlet-name>
<servlet-class>com.alpine.servlets.CatchEventDataExtractedServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dataExtracted</servlet-name>
<url-pattern>/_ah/push-handlers/dataExtracted</url-pattern>
</servlet-mapping>
<security-constraint>
<web-resource-collection>
<web-resource-name>push-handlers</web-resource-name>
<url-pattern>/_ah/push-handlers/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
I am having difficulty debugging because I do not seem to have access to any logging data which might indicate the source of the error. The messages just disappear into the ether.
The pubsub topics and subscriptions reside within the same project as the app engine instance.
One thing in the "Subscriber Guide" that is a little confusing to me is this statement:
Currently the only supported endpoint is an HTTPS server that can accept Webhook delivery.
I am uncertain as to what exactly "Webhook delivery" means.
https://myappid.appspot.com/path/to/some/servlet
) as the pushEndpoint. – konqi