Capture or get messages between two endpoints using "IceStorm" from "Ice.Application"

josedavidjosedavid ToledoMember Jose DavidOrganization: ZennioProject: Home automation remote
edited March 20 in Help Center

Hi,

I have the following scenario:

Endpoint 1 <-> Ice.Application - IceStorm <-> Endpoint 2

Both endpoints send their communication proxies to "Ice.Application" and it subscribes them using "IceStorm" (IceStorm/TopicManager).

Is there any way to get or capture the messages/communications that are passing between both endpoints from "Ice.Application"?

Thanks!

Tagged:

Answers

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    Hi,

    So if I understanding it correctly, endpoint1 and endpoint2 are two applications which are connecting to a 3rd application (which uses IceStorm)?

    Can you explain what you're trying to do? What is the intent of capturing the communication that goes through this 3rd Ice.Application based application?

    Cheers,
    Benoit.

  • josedavidjosedavid ToledoMember Jose DavidOrganization: ZennioProject: Home automation remote

    Hi,

    Yes, EP1 and EP2 send their proxy to a 3rd application (Ice.Application) in a server that is in charge of making the pub/subscription of both in the icestorm instance and so EP1 and EP2 are already communicated.

    I want to see the messages and communications that are passed between EP1 and EP2 using icestorm pub/subscription. Messages are defined by slice interfaces.

    It is for statistical purposes (see the interfaces that are most used and with what content).

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    Hi,

    Did you consider enabling Ice metrics in IceStorm to gather this information?

    Ice metrics will allow you to obtain information on the dispatch and invocations that are going through IceStorm. It can for example provide the number of dispatch for a given operation on a given Ice publisher object.

    You can find information on metrics here:

    You can also try it out with the Ice demos:

    • uncomment the Ice.Admin.Endpoints in the C++ IceStorm/clock demo directory
    • run C++ the IceStorm/clock demo
    • run ./Metrics.py --Endpoints="tcp -p 10004" --InstanceName=icestorm dump in the python/Ice/metrics demo directory to dump the IceStorm metrics

    While this will allow you to get statistical information on how many times a given operation is called (and the size of the request), you won't be able to get information on the content... I you need this, you would need to intercept all the requests published by publishers before forwarding them to IceStorm. Let us know if you need more information on this.

    Cheers,
    Benoit.

  • josedavidjosedavid ToledoMember Jose DavidOrganization: ZennioProject: Home automation remote

    Hi,

    I was looking the metrics a long time ago but they don't work for me since the interesting information to statistics are in the content of the messages.

    you won't be able to get information on the content... I you need this, you would need to intercept all the requests published by publishers before forwarding them to IceStorm. Let us know if you need more information on this.

    This I think can help me to get the information I want. Can you explain how I could do it?

    Very thanks!

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    Hi,

    If you need to extract information from the request parameters, you will need to implement a service that receives the requests from the publishers and forward them to IceStorm. Your application, instead of providing the topic's publisher proxy to publishers, would provide a proxy on your publisher interceptor object and the implementation of your publisher interceptor would forward the requests to the IceStorm publisher.

    Another option could be to implement a subscriber that receives all the updates that are going through IceStorm and whose sole purpose would be to gather statistical information on the messages that are going through IceStorm.

    Cheers,
    Benoit.

  • josedavidjosedavid ToledoMember Jose DavidOrganization: ZennioProject: Home automation remote

    Hi,

    The second option was the one I had originally thought about but I wanted to know if there was any more direct way.

    I will also investigate the first option you mention in the documentation.

    Thank you very much Benoit.

Sign In or Register to comment.