Skip to content

Commit

Permalink
fix: Use nondurable cursors for pulsar readers
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaphoenix committed Aug 22, 2024
1 parent 5bb283a commit 4f54cc0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/consumer/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ impl<Exe: Executor> ConsumerBuilder<Exe> {
// would this clone() consume too much memory?
let (mut config, mut joined_topics) = self.clone().validate::<T>().await?;

// Internally, the reader interface is implemented as a consumer using an exclusive, non-durable subscription
config.options.durable(false);

// the validate() function defaults sub_type to SubType::Shared,
// but a reader's subscription is exclusive
warn!("Subscription Type for a reader is `Exclusive`. Resetting.");
Expand Down

0 comments on commit 4f54cc0

Please sign in to comment.