Appengine Channel API devserver vs production

85 Views Asked by At

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:

  1. Client requests new Channel via HTTP GET
  2. Server creates new Channel and sends back channel token:

    ChannelService service = ChannelServiceFactory.getChannelService();
    String token = service.createChannel(client, CHANNEL_VALID_DURATION);
    
  3. Client opens new channel:

    channel = new goog.appengine.Channel(token);
    socket = channel.open();
    socket.onopen = onOpened;
    

    onOpend Method is called

  4. 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?

0

There are 0 best solutions below