I'm using Channel API on Google Appengine to send updates from my server application to the frontend. Frontend is built with AngularJS.
This works fine in GAE devserver, but when I deploy to production no messages are received in frontend. There are no error messages in Backend or Frontend.
Here are code snippets to show how my implementation works:
- Client requests new Channel via HTTP GET
Server creates new Channel and sends back channel token:
ChannelService service = ChannelServiceFactory.getChannelService(); String token = service.createChannel(client, CHANNEL_VALID_DURATION);
Client opens new channel:
channel = new goog.appengine.Channel(token); socket = channel.open(); socket.onopen = onOpened;
onOpend Method is called
Server sends message to client via channel
ChannelService channelService = ChannelServiceFactory.getChannelService(); channelService.sendMessage(new ChannelMessage(token, message));
I can see from my logs that this sendMessage is called in Backend, but I don't receive any message in frontend.
Are there any settings in AppEngine to get ChannelApi working?