achilleasa / dart_amqp

Dart AMQP client implementing protocol version 0.9.1
MIT License
79 stars 40 forks source link

channel.qos() issue: NOT_IMPLEMENTED - prefetch_size!=0 (1) #127

Closed JesseDWatts closed 3 months ago

JesseDWatts commented 3 months ago

I am having issues communicating the prefetch count and limit.

If PrefetchSize = 0 ChannelException(PRECONDITION_FAILED): PRECONDITION_FAILED - consumer prefetch count is not set

If PrefetchSize = 1 ConnectionException(NOT_IMPLEMENTED): NOT_IMPLEMENTED - prefetch_size!=0 (1)

For reference my setup is pretty generic:

client = Client(settings: settings);
channel = await client!.channel();
await channel!.qos(1,0)
var settings = ConnectionSettings(
      tlsContext: SecurityContext(withTrustedRoots: true),
      port: 5671,
      host: Uri.parse(connectionStringNoPass).host,
      authProvider: PlainAuthenticator(username, password),
      virtualHost: Uri.parse(connectionStringNoPass).pathSegments.last,
    );

The QOS works with pika for my Python API, so i beleive there are no issues on the broker side:

self.connection = pika.BlockingConnection(parameters)
        self.channel = self.connection.channel()
        self.channel.basic_qos(prefetch_count=500)
        self.callback_fn = callback_fn
        self.offsets_filename = offsets_filename