forcedotcom / EMP-Connector

A simplified cometd connector for Enterprise Messaging Platform
BSD 3-Clause "New" or "Revised" License
185 stars 243 forks source link

Buffering capacity 1048576 exceeded #60

Closed samdai closed 4 years ago

samdai commented 5 years ago

When we subscribe platform events from SFDC using EMP connector, sometimes we receive the below error message, does anyone know what is the root cause of error "Buffering capacity 1048576 exceeded"? 2019-08-16 11:53:07,078 WARN [c.i.s.e.lib.EmpConnector] [ HttpClient@153c6041-935910] EMP connector received error message: {failure={exception=java.lang.IllegalArgumentException: Buffering capacity 1048576 exceeded, message={clientId=jr1mvw84q01iegfw6mtlig4fqfm, channel=/meta/connect, id=16376, connectionType=long-polling}, connectionType=long-polling}, channel=/meta/connect, id=16376, successful=false}, will stop and restore the connection.

dzmitry-kankalovich commented 4 years ago

Is there any resolution to the problem?

lmcalpin commented 4 years ago

Increase the maxBufferSize in the BayeuxParameters (make sure that the longPollingOptions includes that value keyed by 'maxMessageSize').

edmondop commented 3 years ago

@lmcalpin does this imply the messages / some messages might be lost?

pmeister commented 3 years ago

@lmcalpin Do you know what the buffer is buffering? I'm trying to understand the nature of this error, not just to work around it by increasing the buffer size.

edmondop commented 3 years ago

@pmeister we figured out on our side that messages are lost by the buffer if you do not provide enough space. It is buffering the streamingAPI messages and this is producing lost notifications if you resubscribe with replayId = -2 and you have a lot of messages in the retention window

Ziauddin135 commented 2 years ago

@lmcalpin ,

Can you please help how to set maxMessageSize Map against longPollingTrabsportOptions in properties file?

Thanks