Archived

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

How to setup IceStorm to push via UDP.

I'd like to use TCP to publish into IceStorm but let subscribers receive data via UDP. Is that possible?

If so does this really get me any closer to multicast updates which is what I'd really like anyway.

Thanks,

Comments

  • mes
    mes California
    Hi John,

    Your subscribers can use UDP to receive events, they just need to pass a datagram proxy to IceStorm's subscribe operation.

    Regarding multicast, this doesn't really help because Ice doesn't currently support it. It is on our TODO list, but not a high priority at present. Of course, priorities can be influenced. ;)

    Take care,
    - Mark
  • That worked.

    ObjectPrx proxy = adapter-> addWithUUID(navUpdate);
    ObjectPrx proxyUdp = proxy->ice_datagram();
    ...
    topic->subscribe(IceStorm::QoS(), proxyUdp)

    But now a second question: In the above code would I have a memory leak if I had done this:

    ObjectPrx proxy = adapter-> addWithUUID(navUpdate);
    topic->subscribe(IceStorm::QoS(), proxy->ice_datagram())
  • mes
    mes California
    JohnB wrote:
    But now a second question: In the above code would I have a memory leak if I had done this:

    ObjectPrx proxy = adapter-> addWithUUID(navUpdate);
    topic->subscribe(IceStorm::QoS(), proxy->ice_datagram())
    No, this does not cause a leak. The proxy returned by ice_datagram would survive long enough as a temporary variable to be marshaled as a parameter, and would then be destroyed automatically when its reference count drops to zero. Isn't the C++ mapping great? :)

    - Mark