Archived

This forum has been archived. Please start a new discussion on GitHub.

Problem about Ice Storm Sample

As we know,Ice have given us clock sample code with Ice Storm componnet.

Subscriber can get the message from Publisher.

So I do the follow test:

1.run some subscribers
2.run Publisher flush messages.
3.long time later,run Publisher again.

I found the IcestromAdmin show none objects active.This means the subscriber disconnected.

How can I release the subscriber long time connection?

Thank you.

Comments

  • benoit
    benoit Rennes, France
    I'm not sure I understand your problem and your question. Is your problem that the subscriber appears to get disconnected after some time?

    If that's the case... subscribers should stay connected to the topic as long as they don't explicitly unsubscribe from the topic. I recommend increasing the IceStorm tracing to figure out what IceStorm is doing wrt subscribes/unsubscribes. You can for example set the following properties:

    IceStorm.Trace.Subscriber=1
    IceStorm.Trace.Topic=1

    Benoit.
  • Whe I run Publisher to flush messages to several subscribers, Icestormadm show me everything is right. But some time later, when I redo it, Icestormadm show me no active objects.

    I want to know if Subscriber can get message after long time, and if Icestorm has Timeout setting to be limited.
  • Some Loginfo

    My IceBox Log as follow(3 Subscriber booted):

    [ icebox-IceStorm: Network: accepted tcp connection
    local address = 10.16.11.61:1483
    remote address = 10.16.11.61:1526 ]
    [ icebox-IceStorm: Subscriber: c2912916-779c-49f2-b208-278a670e6255: publish fai
    led: .\ConnectionI.cpp:1993: Ice::CloseConnectionException:
    protocol error: connection closed ]
    [ icebox-IceStorm: Subscriber: 189a8e95-faaa-42fe-993f-a1ce3a1aedcb: publish fai
    led: .\ConnectionI.cpp:1993: Ice::CloseConnectionException:
    protocol error: connection closed ]
    [ icebox-IceStorm: Subscriber: aac967a8-b2d6-49f7-9899-4e6e8f169e63: publish fai
    led: .\ConnectionI.cpp:431: Ice::ConnectionTimeoutException:
    connection has timed out ]
    [ icebox-IceStorm: Network: shutting down tcp connection for writing
    local address = 10.16.11.61:10000
    remote address = 10.16.11.61:1523 ]
    [ icebox-IceStorm: Network: closing tcp connection
    local address = 10.16.11.61:10000
    remote address = 10.16.11.61:1523 ]
    [ icebox-IceStorm: Network: shutting down tcp connection for writing
    local address = 10.16.11.61:1483
    remote address = 10.16.11.61:1526 ]
    [ icebox-IceStorm: Network: closing tcp connection
    local address = 10.16.11.61:1483
    remote address = 10.16.11.61:1526 ]

    My config as follow:

    C:\Ice-2.1.0\demo\IceStorm\clock>type config
    #
    # This property is used to configure the endpoints of the clock
    # subscriber adapter.
    #
    Clock.Subscriber.Endpoints=tcp

    #
    # This property is used by the clients to connect to IceStorm.
    #
    IceStorm.TopicManager.Proxy=IceStorm/TopicManager:default -p 10000

    #
    # This property defines the endpoints on which the IceStorm
    # TopicManager listens.
    #
    IceStorm.TopicManager.Endpoints=default -p 10000

    #
    # This property defines the endpoints on which the topic
    # publisher objects listen.
    #
    IceStorm.Publish.Endpoints=default

    #
    # TopicManager Tracing
    #
    # 0 = no tracing
    # 1 = trace topic creation, subscription, unsubscription
    # 2 = like 1, but with more detailed subscription information
    #
    IceStorm.Trace.TopicManager=1

    #
    # Topic Tracing
    #
    # 0 = no tracing
    # 1 = trace unsubscription diagnostics
    #
    IceStorm.Trace.Topic=1

    #
    # Subscriber Tracing
    #
    # 0 = no tracing
    # 1 = subscriber diagnostics (subscription, unsubscription, event
    # propagation failures)
    #
    IceStorm.Trace.Subscriber=1

    #
    # Flush Tracing (for batch mode transfer flushing)
    #
    # 0 = no tracing
    # 1 = trace activity of flusher thread
    #
    IceStorm.Trace.Flush=1

    #
    # Amount of time in milliseconds between flushes for batch mode
    # transfer. The minimum allowable value is 100ms.
    #
    IceStorm.Flush.Timeout = 20000000000

    Can you help me? :confused:
  • benoit
    benoit Rennes, France
    Sorry for the late answer. The subscriber shouldn't be disconnected even if it didn't receive any messages for a while. I believe your problem is caused by a bug in Ice 2.1.0 which was fixed in Ice 2.1.1. Can you upgrade and try again? Thanks.

    Benoit.
  • benoit wrote:
    Sorry for the late answer. The subscriber shouldn't be disconnected even if it didn't receive any messages for a while. I believe your problem is caused by a bug in Ice 2.1.0 which was fixed in Ice 2.1.1. Can you upgrade and try again? Thanks.

    Benoit.

    Thanks for your answer. That's great. I'll try it.
  • Everything is right!!!

    :p Thanks!