use of org.apache.qpid.proton.reactor.ReactorOptions in project azure-iot-sdk-java by Azure.
the class AmqpsIotHubConnection method createReactor.
private Reactor createReactor() throws TransportException {
try {
ReactorOptions options = new ReactorOptions();
// If this option isn't set, proton defaults to 16 * 1024 max frame size. This used to default to 4 * 1024,
// and this change to 16 * 1024 broke the websocket implementation that we layer on top of proton-j.
// By setting this frame size back to 4 * 1024, AMQPS_WS clients can send messages with payloads up to the
// expected 256 * 1024 bytes. For more context, see https://github.com/Azure/azure-iot-sdk-java/issues/742
options.setMaxFrameSize(MAX_FRAME_SIZE);
if (this.authenticationType == DeviceClientConfig.AuthType.X509_CERTIFICATE) {
// x509 authentication does not use SASL, so disable it
options.setEnableSaslByDefault(false);
}
return Proton.reactor(options, this);
} catch (IOException e) {
throw new TransportException("Could not create Proton reactor", e);
}
}
Aggregations