Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast to BroadcasterCache AtmosphereResource #1412

Closed
omidp opened this issue Dec 30, 2013 · 1 comment
Closed

Broadcast to BroadcasterCache AtmosphereResource #1412

omidp opened this issue Dec 30, 2013 · 1 comment

Comments

@omidp
Copy link

omidp commented Dec 30, 2013

Hi,

After each push by client, I create a dynamic broadcaster and add it to suspended resource as follow

Broadcaster br = BroadcasterFactory.getDefault().lookup(
                    "/documents/" + pathParam + "/children", true);

            if (!br.getAtmosphereResources().contains(resource))
            {
                AtmosphereResource source = AtmosphereResourceFactory.getDefault().find(resource.uuid());
                if (source == null)
                    source = resource;
                br.addAtmosphereResource(source);
            }

then I fire an event for broadcaster.

//channelName e.g /documents/1/children
if (BroadcasterFactory.getDefault().lookup(channelName) != null)
            BroadcasterFactory.getDefault().lookup(channelName).broadcast(output);

everything works fine until a connection gets closed by proxy server. nothing sends to client anymore. I guess this is a bug. I also lookup all broadcaster, all broadcaster is available the only difference is in atmosphere resource.

before disconnect

    Name: documents/1/children
    AtmosphereResource: 1
    BroadcasterCache org.atmosphere.cache.UUIDBroadcasterCache

after disconnect

Name: /documents/1/children
    AtmosphereResource: 0
    BroadcasterCache org.atmosphere.cache.UUIDBroadcasterCache

I'm using atmosphere 2.0.3 and tomcat 7 and nginx 1.4.4.

@jfarcand
Copy link
Member

jfarcand commented Jan 6, 2014

Next time please use the maling list. You need to re-associate the new resource or use the AtmosphereSession. Let continue the discussion on the ML.

@jfarcand jfarcand closed this as completed Jan 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants