Archived

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

Ice.MessageSizeMax

Our C++ server includes Ice interfaces (Ice 3.2) with methods which could potentially return large strings to a ruby client. A typical interface might look like this:
interface Shipment
{
  ...
  idempotent string PDFReportSummary();
	...
};

Here, PDFReportSummary returns a base64 encoded PDF report which can exceed the 1024KB and if it does, the call fails.

According to the bible, the Ice.MessageSizeMax is set to 1024KB by default. I therefore thought all I needed to do was to set this property to a larger value in both, the C++ and the ruby Ice communicator.

In C++ I have this inside the startup code:
Ice::PropertiesPtr pProps = Ice::Application::communicator()->getProperties();
pProps->setProperty("Ice.MessageSizeMax", "65536");

In Ruby I do:
props = Ice.createProperties(ARGV)
props.setProperty("Ice.MessageSizeMax", "65536");

However, this does not appear to be making any difference as the method still fails if the size of the string exceeds 1MB.

What am I missing?
Pete

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Peter,
    In C++ I have this inside the startup code:

    Code:

    Ice::PropertiesPtr pProps = Ice::Application::communicator()->getProperties();
    pProps->setProperty("Ice.MessageSizeMax", "65536");

    You should set this property before the communicator is initialized, setting the property after the communicator was initialized does nothing.

    Cheers,
    José
  • Hi Jose,

    Since my startup code was based on Ice::Application I had little control over when and how the communicator was constructed.

    Once I removed Ice::Application things started working fine.

    Thanks for your help
    Pete