pulsar-dotpulsar
pulsar-dotpulsar copied to clipboard
feat: #46 support nack delay and ack timeouts
- feat: #45
Consumer
now supportsNegativeAcknowledge
- add
AcknowledgementTimeout
toConsumerOptions
- add
NegativeAcknowledgementRedeliveryDelay
toConsumerOptions
- add
NegativeackedMessageState
to manage nacked messages - add
UnackedMessageState
to manage unacked messages - add
MessageTracker
to periodically check unacked and nacked messages, on a fixed polling timeout of 10ms - add
AwaitingAck
to track both unacked and nacked messages - add
InactiveMessageTracker
to reduce overhead when noAcknowledgementTimeout
orNegativeAcknowledgementRedeliveryDelay
is configured - add
InactiveNegativeackedMessageState
to reduce overhead when noNegativeAcknowledgementRedeliveryDelay
is configured - add
InactiveUnackedMessageState
to reduce overhead when noAcknowledgementTimeout
is configured - update
ConsumerBuilder
to allow settingAcknowledgementTimeout
- update
ConsumerBuilder
to allow settingNegativeAcknowledgementRedeliveryDelay
- refactor
ConsumerChannel
to supportNegativeAcknowledge
- refactor
AsyncQueue<T>
to implement missing interfaceIAsyncQueue<T>
- refactor
BatchHandler<TMessage>
to implement missing interfaceIBatchHandler<TMessage>
- add
AutoFixture
andAutoFixture.AutoNSubstitute
dependencies to unit test project - add missing
ConsumerBuilderTests
unit tests - add missing
ConsumerChannelFactoryTests
unit tests - add missing
ConsumerChannelTests
unit tests - add missing
ConsumerTests
unit tests - add IntegrationTests for consumer ack timout and nack delays
- skipped integration test
SinglePartition_WhenSendMessages_ThenGetMessagesFromSinglePartition
to avoid CI failures - skipped integration test
RoundRobinPartition_WhenSendMessages_ThenGetMessagesFromPartitionsInOrder
to avoid CI failures
Closes: #46 Closes: #45
@blankensteiner let me know what you think
@blankensteiner so I was a bit worried about the interactions with batching, so I've added two integration tests where I attempt to create a scenario where this functionality is tested: https://github.com/apache/pulsar-dotpulsar/blob/e7df3a528e1dd948cd1ec23a5baa51d693fac34f/tests/DotPulsar.IntegrationTests/ConsumerTests.cs#L225-L226
Looking at the other PR's and the still open issue https://github.com/apache/pulsar-dotpulsar/issues/7, am I fooling myself that this tests actually batches the messages and that at the moment there is actually no way (yet) to produce messages in a batched way using dotpulsar? That would make testing this particular behaviour tricky. I'd need to rely on deep(er) knowledge of the workings of batching to implement the right handling for this.
so I was a bit worried about the interactions with batching, so I've added two integration tests where I attempt to create a scenario where this functionality is tested:
https://github.com/apache/pulsar-dotpulsar/blob/e7df3a528e1dd948cd1ec23a5baa51d693fac34f/tests/DotPulsar.IntegrationTests/ConsumerTests.cs#L225-L226
Looking at the other PR's and the still open issue #7, am I fooling myself that this tests actually batches the messages and that at the moment there is actually no way (yet) to produce messages in a batched way using dotpulsar? That would make testing this particular behaviour tricky. I'd need to rely on deep(er) knowledge of the workings of batching to implement the right handling for this.
Thanks for your PR. Currently, dotpulsar does not yet support batch sending. The code in your test isn't the correct batched way. Can we handle this scenario after the batch support is added?
Thanks for your PR. Currently, dotpulsar does not yet support batch sending. The code in your test isn't the correct batched way. Can we handle this scenario after the batch support is added?
@RobertIndie yes that's okay for me, though I would need a strategy (for this PR) to simulate a batched message (to read). Do you have any ideas?
Is there a reason this has not been merged? NegativeAcknowledge is an important part of the messaging capabilities of Pulsar.